summaryrefslogtreecommitdiff
path: root/src/nodemetadata.h
diff options
context:
space:
mode:
authorkwolekr <kwolekr@minetest.net>2015-05-19 02:24:14 -0400
committerkwolekr <kwolekr@minetest.net>2015-05-19 16:10:49 -0400
commitda34a2b33e1f600ec11172f599384b9a92835403 (patch)
treef09a158be783f0486447d0c61750a7509760d83b /src/nodemetadata.h
parent603297cc352cab685dd01dcd645999624ad17c0b (diff)
downloadminetest-da34a2b33e1f600ec11172f599384b9a92835403.tar.gz
minetest-da34a2b33e1f600ec11172f599384b9a92835403.tar.bz2
minetest-da34a2b33e1f600ec11172f599384b9a92835403.zip
Replace instances of std::map<std::string, std::string> with StringMap
Also, clean up surrounding code style Replace by-value parameter passing with const refs when possible Fix post-increment of iterators
Diffstat (limited to 'src/nodemetadata.h')
-rw-r--r--src/nodemetadata.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/nodemetadata.h b/src/nodemetadata.h
index acd45bdf9..8e84e5af3 100644
--- a/src/nodemetadata.h
+++ b/src/nodemetadata.h
@@ -21,10 +21,9 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#define NODEMETADATA_HEADER
#include "irr_v3d.h"
-#include <string>
#include <iostream>
#include <vector>
-#include <map>
+#include "util/string.h"
/*
NodeMetadata stores arbitary amounts of data for special blocks.
@@ -54,19 +53,19 @@ public:
void setString(const std::string &name, const std::string &var);
// Support variable names in values
std::string resolveString(const std::string &str, unsigned short recursion = 0) const;
- std::map<std::string, std::string> getStrings() const
+ StringMap getStrings() const
{
return m_stringvars;
}
// The inventory
- Inventory* getInventory()
+ Inventory *getInventory()
{
return m_inventory;
}
private:
- std::map<std::string, std::string> m_stringvars;
+ StringMap m_stringvars;
Inventory *m_inventory;
};