mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-13 06:21:28 +00:00
[Cleanup] Unconditional return in for loop in GetRaidByCharID() (#3179)
# Notes - This is improper and should just check if we have no result, return `0`, otherwise return `row[0]` of the row we queried.
This commit is contained in:
parent
6a80a061dd
commit
3e5d0a0601
@ -2043,10 +2043,12 @@ uint32 Database::GetRaidIDByCharID(uint32 character_id) {
|
||||
character_id
|
||||
);
|
||||
auto results = QueryDatabase(query);
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
return Strings::ToUnsignedInt(row[0]);
|
||||
if (!results.Success() || !results.RowCount()) {
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
|
||||
auto row = results.begin();
|
||||
return Strings::ToUnsignedInt(row[0]);
|
||||
}
|
||||
|
||||
int Database::CountInvSnapshots() {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user