mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Replace various std::map with UNORDERED_MAP + various cleanups
This is part 2 for 5f084cd98d
Other improvements:
* Use the defined ItemGroupList when used
* make Client::checkPrivilege const
* inline some trivial functions
* Add ActiveObjectMap typedef
* Add SettingsEntries typedef
This commit is contained in:
parent
5f084cd98d
commit
613797a304
23 changed files with 110 additions and 167 deletions
|
@ -220,7 +220,7 @@ int ModApiUtil::l_write_json(lua_State *L)
|
|||
int ModApiUtil::l_get_dig_params(lua_State *L)
|
||||
{
|
||||
NO_MAP_LOCK_REQUIRED;
|
||||
std::map<std::string, int> groups;
|
||||
ItemGroupList groups;
|
||||
read_groups(L, 1, groups);
|
||||
ToolCapabilities tp = read_tool_capabilities(L, 2);
|
||||
if(lua_isnoneornil(L, 3))
|
||||
|
@ -235,7 +235,7 @@ int ModApiUtil::l_get_dig_params(lua_State *L)
|
|||
int ModApiUtil::l_get_hit_params(lua_State *L)
|
||||
{
|
||||
NO_MAP_LOCK_REQUIRED;
|
||||
std::map<std::string, int> groups;
|
||||
UNORDERED_MAP<std::string, int> groups;
|
||||
read_groups(L, 1, groups);
|
||||
ToolCapabilities tp = read_tool_capabilities(L, 2);
|
||||
if(lua_isnoneornil(L, 3))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue