Skip to content

Commit 4c5d403

Browse files
committed
Add const, noexcept
1 parent 2d96e74 commit 4c5d403

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

include/tao/pq/table_field.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ namespace tao::pq
3232
{}
3333

3434
public:
35-
[[nodiscard]] auto index() const -> std::size_t;
35+
[[nodiscard]] auto index() const noexcept -> std::size_t;
3636

3737
[[nodiscard]] auto is_null() const -> bool;
3838
[[nodiscard]] auto get() const -> const char*;
@@ -48,7 +48,7 @@ namespace tao::pq
4848
return as< std::optional< T > >();
4949
}
5050

51-
[[nodiscard]] auto operator==( null_t /*unused*/ )
51+
[[nodiscard]] auto operator==( null_t /*unused*/ ) const
5252
{
5353
return is_null();
5454
}

src/lib/pq/table_field.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
namespace tao::pq
1212
{
13-
auto table_field::index() const -> std::size_t
13+
auto table_field::index() const noexcept -> std::size_t
1414
{
1515
return m_column - m_row->m_offset;
1616
}

0 commit comments

Comments
 (0)