switched to reference rather than copy semantics for query on RunQuery

This commit is contained in:
Arthur Ice 2013-06-03 16:25:42 -07:00
parent 1e7a4e151c
commit 46918cdbec
2 changed files with 2 additions and 2 deletions

View File

@ -59,7 +59,7 @@ void DBcore::ping() {
MDatabase.unlock();
}
bool DBcore::RunQuery(const std::string query, char* errbuf, MYSQL_RES** result, uint32* affected_rows, uint32* last_insert_id, uint32* errnum, bool retry) {
bool DBcore::RunQuery(const std::string& query, char* errbuf, MYSQL_RES** result, uint32* affected_rows, uint32* last_insert_id, uint32* errnum, bool retry) {
_CP(DBcore_RunQuery);
if (errnum)
*errnum = 0;

View File

@ -22,7 +22,7 @@ public:
DBcore();
~DBcore();
eStatus GetStatus() { return pStatus; }
bool RunQuery(const std::string query, char* errbuf = 0, MYSQL_RES** result = 0, uint32* affected_rows = 0, uint32* last_insert_id = 0, uint32* errnum = 0, bool retry = true);
bool RunQuery(const std::string& query, char* errbuf = 0, MYSQL_RES** result = 0, uint32* affected_rows = 0, uint32* last_insert_id = 0, uint32* errnum = 0, bool retry = true);
void DoEscapeString(std::string& outString, const char* frombuf, uint32 fromlen);
void ping();
MYSQL* getMySQL(){ return &mysql; }