mirror of
https://github.com/minetest/minetest.git
synced 2025-01-11 15:57:29 +01:00
LBM content mapping map doesn't need to be ordered, use std::unordered_map
Also rename helper to lbm_map instead of container_map
This commit is contained in:
parent
14a1a712de
commit
a8c405b04e
@ -109,7 +109,7 @@ void LBMContentMapping::addLBM(LoadingBlockModifierDef *lbm_def, IGameDef *gamed
|
|||||||
const std::vector<LoadingBlockModifierDef *> *
|
const std::vector<LoadingBlockModifierDef *> *
|
||||||
LBMContentMapping::lookup(content_t c) const
|
LBMContentMapping::lookup(content_t c) const
|
||||||
{
|
{
|
||||||
container_map::const_iterator it = map.find(c);
|
lbm_map::const_iterator it = map.find(c);
|
||||||
if (it == map.end())
|
if (it == map.end())
|
||||||
return NULL;
|
return NULL;
|
||||||
// This first dereferences the iterator, returning
|
// This first dereferences the iterator, returning
|
||||||
|
@ -88,8 +88,8 @@ struct LoadingBlockModifierDef
|
|||||||
|
|
||||||
struct LBMContentMapping
|
struct LBMContentMapping
|
||||||
{
|
{
|
||||||
typedef std::map<content_t, std::vector<LoadingBlockModifierDef *> > container_map;
|
typedef std::unordered_map<content_t, std::vector<LoadingBlockModifierDef *>> lbm_map;
|
||||||
container_map map;
|
lbm_map map;
|
||||||
|
|
||||||
std::vector<LoadingBlockModifierDef *> lbm_list;
|
std::vector<LoadingBlockModifierDef *> lbm_list;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user