From 81855f4cfcfb237ec2e441702253e5b522a89b7f Mon Sep 17 00:00:00 2001 From: kiritow <1362050620@qq.com> Date: Fri, 9 Jun 2017 22:59:53 +0800 Subject: [PATCH] Update Constant attribute in class SQLDB --- MiniEngine_SQLite.cpp | 8 ++++---- MiniEngine_SQLite.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/MiniEngine_SQLite.cpp b/MiniEngine_SQLite.cpp index 9248233..16c0816 100644 --- a/MiniEngine_SQLite.cpp +++ b/MiniEngine_SQLite.cpp @@ -42,13 +42,13 @@ int _global_sqldb_executor(void* ExParam,int colNum,char** colVal,char** colName return (*p)(colNum,colVal,colName); } - +//private void SQLDB::_set(sqlite3* p) { _db.reset(p,sqlite3_close); } - -sqlite3* SQLDB::_get() +//private +sqlite3* SQLDB::_get() const { return _db.get(); } @@ -85,7 +85,7 @@ int SQLDB::exec_raw(const std::string& SQLCommand,SQLCallback callback,void* par { return _exec_real(SQLCommand,callback,param); } - +//private int SQLDB::_exec_real(const std::string& SQLCommand,SQLCallback callback,void* param) { return sqlite3_exec(_get(),SQLCommand.c_str(),callback,param,&_errmsg); diff --git a/MiniEngine_SQLite.h b/MiniEngine_SQLite.h index cc3a507..25572f8 100644 --- a/MiniEngine_SQLite.h +++ b/MiniEngine_SQLite.h @@ -58,7 +58,7 @@ public: private: int _exec_real(const std::string& SQLCommand,SQLCallback callback,void* param); - sqlite3* _get(); + sqlite3* _get() const; void _set(sqlite3*); std::shared_ptr _db; char* _errmsg;