From 0b400af9519444deef4cc6ad2c43c30e2092ab4f Mon Sep 17 00:00:00 2001 From: Dominick Allen Date: Sat, 4 Jan 2025 09:56:12 -0600 Subject: Fix bug related to string copying. --- include/fud_sqlite.hpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'include/fud_sqlite.hpp') diff --git a/include/fud_sqlite.hpp b/include/fud_sqlite.hpp index c56b4a1..b2d2f5b 100644 --- a/include/fud_sqlite.hpp +++ b/include/fud_sqlite.hpp @@ -28,6 +28,7 @@ namespace fud { class SqliteStatement; +// NOLINTNEXTLINE(performance-enum-size) enum class SqliteOpenMode : int { ReadOnly = SQLITE_OPEN_READONLY, @@ -59,7 +60,7 @@ class SqliteDb { SqliteDb& operator=(SqliteDb&& rhs) noexcept; - bool valid() const; + [[nodiscard]] bool valid() const; bool revalidate(); @@ -69,12 +70,12 @@ class SqliteDb { void* context, std::unique_ptr errorMessage); - constexpr int errorCode() + [[nodiscard]] constexpr int errorCode() const { return m_errorCode; } - constexpr sqlite3* handle() const + [[nodiscard]] constexpr sqlite3* handle() const { return m_dbHandle; } @@ -115,7 +116,7 @@ class SqliteStatement { SqliteStatement& operator=(SqliteStatement&& rhs) noexcept = delete; - bool valid() const; + [[nodiscard]] bool valid() const; sqlite3_stmt* statement(); @@ -123,7 +124,7 @@ class SqliteStatement { FudStatus reset(); - constexpr int errorCode() + [[nodiscard]] constexpr int errorCode() const { return m_errorCode; } -- cgit v1.2.3