Set items to static

Set items to static and call the json load only once.
This commit is contained in:
Nemirtingas 2019-07-17 17:28:39 +02:00
parent 7853451b01
commit fb31aef9b2
2 changed files with 16 additions and 9 deletions

5
dll/steam_inventory.cpp Normal file
View file

@ -0,0 +1,5 @@
#include "steam_inventory.h"
std::once_flag Steam_Inventory::items_loading;
std::atomic_bool Steam_Inventory::items_loaded(false);
std::map<SteamItemDef_t, std::map<std::string, std::string>> Steam_Inventory::items;