mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Some globals (un-)init fixes
This commit is contained in:
parent
2af5191070
commit
d8190e1c5f
16 changed files with 58 additions and 62 deletions
|
@ -355,12 +355,11 @@ const KeyPress CancelKey("KEY_CANCEL");
|
|||
*/
|
||||
|
||||
// A simple cache for quicker lookup
|
||||
std::unordered_map<std::string, KeyPress> g_key_setting_cache;
|
||||
static std::unordered_map<std::string, KeyPress> g_key_setting_cache;
|
||||
|
||||
KeyPress getKeySetting(const char *settingname)
|
||||
{
|
||||
std::unordered_map<std::string, KeyPress>::iterator n;
|
||||
n = g_key_setting_cache.find(settingname);
|
||||
auto n = g_key_setting_cache.find(settingname);
|
||||
if (n != g_key_setting_cache.end())
|
||||
return n->second;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue