summaryrefslogtreecommitdiff
path: root/include/fud_sqlite.hpp
diff options
context:
space:
mode:
authorDominick Allen <djallen@librehumanitas.org>2025-01-04 09:56:12 -0600
committerDominick Allen <djallen@librehumanitas.org>2025-01-04 09:56:12 -0600
commit0b400af9519444deef4cc6ad2c43c30e2092ab4f (patch)
treee6b0d78a2c292a7df5724f150e123b55d7871819 /include/fud_sqlite.hpp
parent253385f4bca5ccd2fee22fea8333dfe435c0df0a (diff)
Fix bug related to string copying.
Diffstat (limited to 'include/fud_sqlite.hpp')
-rw-r--r--include/fud_sqlite.hpp11
1 files changed, 6 insertions, 5 deletions
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<SqliteErrorMsg> 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;
}