diff options
author | Perttu Ahola <celeron55@gmail.com> | 2012-03-04 14:22:35 +0200 |
---|---|---|
committer | Perttu Ahola <celeron55@gmail.com> | 2012-03-10 11:28:13 +0200 |
commit | 07ed57476f56c54e781ab33467d3373d976d24b1 (patch) | |
tree | 5643802c01133f963cf440c7486691c31dc31d89 /src/itemdef.h | |
parent | 0b21618a054fbfa9f4b5e99a5044f2b2dd1d642b (diff) | |
download | minetest-07ed57476f56c54e781ab33467d3373d976d24b1.tar.gz minetest-07ed57476f56c54e781ab33467d3373d976d24b1.tar.bz2 minetest-07ed57476f56c54e781ab33467d3373d976d24b1.zip |
itemgroup.h and ItemGroupList typedef
Diffstat (limited to 'src/itemdef.h')
-rw-r--r-- | src/itemdef.h | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/src/itemdef.h b/src/itemdef.h index 15734ff44..904b4a221 100644 --- a/src/itemdef.h +++ b/src/itemdef.h @@ -25,24 +25,11 @@ with this program; if not, write to the Free Software Foundation, Inc., #include <string> #include <iostream> #include <set> -#include <map> +#include "itemgroup.h" class IGameDef; struct ToolCapabilities; /* - Some helpers -*/ - -static inline int itemgroup_get(const std::map<std::string, int> &groups, - const std::string &name) -{ - std::map<std::string, int>::const_iterator i = groups.find(name); - if(i == groups.end()) - return 0; - return i->second; -} - -/* Base item definition */ @@ -78,7 +65,7 @@ struct ItemDefinition bool liquids_pointable; // May be NULL. If non-NULL, deleted by destructor ToolCapabilities *tool_capabilities; - std::map<std::string, int> groups; + ItemGroupList groups; /* Cached stuff |