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()
{
if (call_definition_update || inventory_requests.size()) {
if (call_definition_update || !inventory_requests.empty()) {
if (!item_definitions_loaded) {
read_items_db();
item_definitions_loaded = true;
@ -842,7 +842,7 @@ void RunCallbacks()
call_definition_update = false;
}
if (inventory_requests.size() && !inventory_loaded) {
if (!inventory_requests.empty() && !inventory_loaded) {
read_inventory_db();
inventory_loaded = true;
}