mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-01-09 14:27:10 +00:00
fix optional (#1707)
This commit is contained in:
parent
021db0ecd1
commit
94e7cfc211
@ -56,6 +56,7 @@ std::optional<IProperty::PropertyEntranceResult> MySQLDatabase::GetProperties(co
|
|||||||
params.playerId
|
params.playerId
|
||||||
);
|
);
|
||||||
if (count->next()) {
|
if (count->next()) {
|
||||||
|
if (!result) result = IProperty::PropertyEntranceResult();
|
||||||
result->totalEntriesMatchingQuery = count->getUInt("count");
|
result->totalEntriesMatchingQuery = count->getUInt("count");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -109,11 +110,13 @@ std::optional<IProperty::PropertyEntranceResult> MySQLDatabase::GetProperties(co
|
|||||||
params.playerSort
|
params.playerSort
|
||||||
);
|
);
|
||||||
if (count->next()) {
|
if (count->next()) {
|
||||||
|
if (!result) result = IProperty::PropertyEntranceResult();
|
||||||
result->totalEntriesMatchingQuery = count->getUInt("count");
|
result->totalEntriesMatchingQuery = count->getUInt("count");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
while (properties->next()) {
|
while (properties->next()) {
|
||||||
|
if (!result) result = IProperty::PropertyEntranceResult();
|
||||||
auto& entry = result->entries.emplace_back();
|
auto& entry = result->entries.emplace_back();
|
||||||
entry.id = properties->getUInt64("id");
|
entry.id = properties->getUInt64("id");
|
||||||
entry.ownerId = properties->getUInt64("owner_id");
|
entry.ownerId = properties->getUInt64("owner_id");
|
||||||
|
Loading…
Reference in New Issue
Block a user