1
0
Fork 0

Removed isDone check

The same data is returned by executeStep so why execute a call when you have the data.
This commit is contained in:
worktycho 2014-08-31 21:26:02 +01:00
parent 361b7d5379
commit 468c2558d6
1 changed files with 2 additions and 2 deletions

View File

@ -477,8 +477,8 @@ AString cRankManager::GetPlayerRankName(const AString & a_PlayerUUID)
{
SQLite::Statement stmt(m_DB, "SELECT Rank.Name FROM Rank LEFT JOIN PlayerRank ON Rank.RankID = PlayerRank.RankID WHERE PlayerRank.PlayerUUID = ?");
stmt.bind(1, a_PlayerUUID);
stmt.executeStep();
if (stmt.isDone())
// executeStep returns false on no data
if (!stmt.executeStep())
{
// No data returned from the DB
return AString();