diff options
Diffstat (limited to 'src/common/Database/MySQLConnection.cpp')
| -rw-r--r-- | src/common/Database/MySQLConnection.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/common/Database/MySQLConnection.cpp b/src/common/Database/MySQLConnection.cpp index 6dbd99ded1..d3b25fc2aa 100644 --- a/src/common/Database/MySQLConnection.cpp +++ b/src/common/Database/MySQLConnection.cpp @@ -26,9 +26,9 @@ MySQLConnection::MySQLConnection(MySQLConnectionInfo& connInfo) : m_reconnecting(false), m_prepareError(false), - m_queue(NULL), - m_worker(NULL), - m_Mysql(NULL), + m_queue(nullptr), + m_worker(nullptr), + m_Mysql(nullptr), m_connectionInfo(connInfo), m_connectionFlags(CONNECTION_SYNCH) { @@ -38,7 +38,7 @@ MySQLConnection::MySQLConnection(ACE_Activation_Queue* queue, MySQLConnectionInf m_reconnecting(false), m_prepareError(false), m_queue(queue), - m_Mysql(NULL), + m_Mysql(nullptr), m_connectionInfo(connInfo), m_connectionFlags(CONNECTION_ASYNC) { @@ -64,7 +64,7 @@ void MySQLConnection::Close() bool MySQLConnection::Open() { MYSQL* mysqlInit; - mysqlInit = mysql_init(NULL); + mysqlInit = mysql_init(nullptr); if (!mysqlInit) { sLog->outError("Could not initialize Mysql connection to database `%s`", m_connectionInfo.database.c_str()); @@ -313,15 +313,15 @@ bool MySQLConnection::_Query(PreparedStatement* stmt, MYSQL_RES** pResult, uint6 ResultSet* MySQLConnection::Query(const char* sql) { if (!sql) - return NULL; + return nullptr; - MYSQL_RES* result = NULL; - MYSQL_FIELD* fields = NULL; + MYSQL_RES* result = nullptr; + MYSQL_FIELD* fields = nullptr; uint64 rowCount = 0; uint32 fieldCount = 0; if (!_Query(sql, &result, &fields, &rowCount, &fieldCount)) - return NULL; + return nullptr; return new ResultSet(result, fields, rowCount, fieldCount); } @@ -460,7 +460,7 @@ void MySQLConnection::PrepareStatement(uint32 index, const char* sql, Connection // to save memory that will not be used. if (!(m_connectionFlags & flags)) { - m_stmts[index] = NULL; + m_stmts[index] = nullptr; return; } @@ -490,12 +490,12 @@ void MySQLConnection::PrepareStatement(uint32 index, const char* sql, Connection PreparedResultSet* MySQLConnection::Query(PreparedStatement* stmt) { - MYSQL_RES* result = NULL; + MYSQL_RES* result = nullptr; uint64 rowCount = 0; uint32 fieldCount = 0; if (!_Query(stmt, &result, &rowCount, &fieldCount)) - return NULL; + return nullptr; if (mysql_more_results(m_Mysql)) { |
