1
0
Fork 0
mirror of https://gitlab.com/Mr_Goldberg/goldberg_emulator.git synced 2024-11-14 10:50:13 +01:00

Little improvements

steam_user_stats: Use the value stored in the JSON object.
steal_inventory: use 'empty' that is guaranteed to be constant in time.
This commit is contained in:
Nemirtingas 2019-11-08 16:00:49 +01:00
parent 02ef03b3f2
commit 56957abc99

View file

@ -828,7 +828,7 @@ bool SubmitUpdateProperties( SteamInventoryUpdateHandle_t handle, SteamInventory
void RunCallbacks() void RunCallbacks()
{ {
if (call_definition_update || inventory_requests.size()) { if (call_definition_update || !inventory_requests.empty()) {
if (!item_definitions_loaded) { if (!item_definitions_loaded) {
read_items_db(); read_items_db();
item_definitions_loaded = true; item_definitions_loaded = true;
@ -842,7 +842,7 @@ void RunCallbacks()
call_definition_update = false; call_definition_update = false;
} }
if (inventory_requests.size() && !inventory_loaded) { if (!inventory_requests.empty() && !inventory_loaded) {
read_inventory_db(); read_inventory_db();
inventory_loaded = true; inventory_loaded = true;
} }