mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-22 18:15:31 +01:00
Core/Misc: Fix some static analysis issues
Fix some static analysis issues about: - uninitialized values, most of which are false positives, always initialized before being accessed - unchecked return values - dead code never executed - bad formatting leading to wrong behavior Please ensure EventMap is never used with event id set to 0 or those events will never execute.
This commit is contained in:
@@ -89,10 +89,9 @@ QueryResult SQLQueryHolder::GetResult(size_t index)
|
||||
if (index < m_queries.size())
|
||||
{
|
||||
ResultSet* result = m_queries[index].second.qresult;
|
||||
if (!result || !result->GetRowCount())
|
||||
if (!result || !result->GetRowCount() || !result->NextRow())
|
||||
return QueryResult(NULL);
|
||||
|
||||
result->NextRow();
|
||||
return QueryResult(result);
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user