mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-14 01:29:07 +00:00
refactor(Core): replace NULL with nullptr (#4593)
This commit is contained in:
@@ -23,7 +23,7 @@ bool SQLQueryHolder::SetQuery(size_t index, const char* sql)
|
||||
element.element.query = strdup(sql);
|
||||
|
||||
SQLResultSetUnion result;
|
||||
result.qresult = NULL;
|
||||
result.qresult = nullptr;
|
||||
|
||||
m_queries[index] = SQLResultPair(element, result);
|
||||
return true;
|
||||
@@ -66,7 +66,7 @@ bool SQLQueryHolder::SetPreparedQuery(size_t index, PreparedStatement* stmt)
|
||||
element.element.stmt = stmt;
|
||||
|
||||
SQLResultSetUnion result;
|
||||
result.presult = NULL;
|
||||
result.presult = nullptr;
|
||||
|
||||
m_queries[index] = SQLResultPair(element, result);
|
||||
return true;
|
||||
@@ -79,13 +79,13 @@ QueryResult SQLQueryHolder::GetResult(size_t index)
|
||||
{
|
||||
ResultSet* result = m_queries[index].second.qresult;
|
||||
if (!result || !result->GetRowCount())
|
||||
return QueryResult(NULL);
|
||||
return QueryResult(nullptr);
|
||||
|
||||
result->NextRow();
|
||||
return QueryResult(result);
|
||||
}
|
||||
else
|
||||
return QueryResult(NULL);
|
||||
return QueryResult(nullptr);
|
||||
}
|
||||
|
||||
PreparedQueryResult SQLQueryHolder::GetPreparedResult(size_t index)
|
||||
@@ -95,12 +95,12 @@ PreparedQueryResult SQLQueryHolder::GetPreparedResult(size_t index)
|
||||
{
|
||||
PreparedResultSet* result = m_queries[index].second.presult;
|
||||
if (!result || !result->GetRowCount())
|
||||
return PreparedQueryResult(NULL);
|
||||
return PreparedQueryResult(nullptr);
|
||||
|
||||
return PreparedQueryResult(result);
|
||||
}
|
||||
else
|
||||
return PreparedQueryResult(NULL);
|
||||
return PreparedQueryResult(nullptr);
|
||||
}
|
||||
|
||||
void SQLQueryHolder::SetResult(size_t index, ResultSet* result)
|
||||
@@ -108,7 +108,7 @@ void SQLQueryHolder::SetResult(size_t index, ResultSet* result)
|
||||
if (result && !result->GetRowCount())
|
||||
{
|
||||
delete result;
|
||||
result = NULL;
|
||||
result = nullptr;
|
||||
}
|
||||
|
||||
/// store the result in the holder
|
||||
@@ -121,7 +121,7 @@ void SQLQueryHolder::SetPreparedResult(size_t index, PreparedResultSet* result)
|
||||
if (result && !result->GetRowCount())
|
||||
{
|
||||
delete result;
|
||||
result = NULL;
|
||||
result = nullptr;
|
||||
}
|
||||
|
||||
/// store the result in the holder
|
||||
|
||||
Reference in New Issue
Block a user