From 2b0489f1144d7afe5c3c6bfb0db66da75c730d67 Mon Sep 17 00:00:00 2001 From: heck Date: Mon, 19 Apr 2021 15:06:37 +0200 Subject: [PATCH] pEpSQLite - some const members --- src/pEpSQLite.cc | 6 +++--- src/pEpSQLite.hh | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/pEpSQLite.cc b/src/pEpSQLite.cc index e07f9b5..5b7c020 100644 --- a/src/pEpSQLite.cc +++ b/src/pEpSQLite.cc @@ -9,7 +9,7 @@ using namespace std; namespace pEp { bool pEpSQLite::log_enabled = false; - pEpSQLite::pEpSQLite(std::string db_path) : db_path(db_path) + pEpSQLite::pEpSQLite(const std::string& db_path) : db_path(db_path) { pEpLogClass("called with: db_path = " + db_path + ""); } @@ -26,7 +26,7 @@ namespace pEp { } } - string pEpSQLite::get_db_path() + string pEpSQLite::get_db_path() const { pEpLogClass("called"); return db_path; @@ -41,7 +41,7 @@ namespace pEp { } } - bool pEpSQLite::is_open() + bool pEpSQLite::is_open() const { if (db == nullptr) { return false; diff --git a/src/pEpSQLite.hh b/src/pEpSQLite.hh index 8876c52..34b1ddb 100644 --- a/src/pEpSQLite.hh +++ b/src/pEpSQLite.hh @@ -19,14 +19,14 @@ namespace pEp { pEpSQLite() = delete; // The database file as a constant for the obj lifetime - pEpSQLite(std::string db_path); - std::string get_db_path(); + explicit pEpSQLite(const std::string& db_path); + std::string get_db_path() const; // Creates the database file not existsing // Will not create any dirs void create_or_open_db(); void close_db(); - bool is_open(); + bool is_open() const; // Delete the database file void delete_db();