X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;ds=sidebyside;f=src%2Fdb%2Fsqlite3db.cpp;h=f8bb003114ce4905e38d07abb091465e9772ed46;hb=221236a4d3aac4144529d418ce368db5c98facb0;hp=86a4f87f3a6e84d0eb8113a87e1d5fd2ac0c0dae;hpb=d5c9f7e6c1dd263dfc85a3cb5941a378a5ddd923;p=fms.git diff --git a/src/db/sqlite3db.cpp b/src/db/sqlite3db.cpp index 86a4f87..f8bb003 100644 --- a/src/db/sqlite3db.cpp +++ b/src/db/sqlite3db.cpp @@ -12,7 +12,7 @@ DB::DB() Initialize(); } -DB::DB(std::string filename) +DB::DB(const std::string &filename) { Initialize(); Open(filename); @@ -22,7 +22,7 @@ DB::~DB() { if(IsOpen()) { - Close(); + Close(); } } @@ -39,12 +39,12 @@ const bool DB::Close() } else { - return false; + return false; } } else { - return false; + return false; } } @@ -60,7 +60,7 @@ const bool DB::Execute(const std::string &sql) } else { - return false; + return false; } } else @@ -82,7 +82,7 @@ const bool DB::ExecuteInsert(const std::string &sql, long &insertid) } else { - return false; + return false; } } else @@ -106,7 +106,7 @@ const int DB::GetLastError(std::string &errormessage) } else { - return SQLITE_OK; + return SQLITE_OK; } } @@ -119,7 +119,7 @@ void DB::Initialize() const bool DB::IsOpen() { Poco::ScopedLock g(m_mutex); - return m_db ? true : false; + return m_db ? true : false; } const bool DB::Open(const std::string &filename) @@ -138,12 +138,12 @@ const bool DB::Open(const std::string &filename) } else { - return false; + return false; } } else { - return false; + return false; } }