summaryrefslogtreecommitdiff
path: root/src/units.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-09-04 19:11:53 +0300
committerAndrei Karas <akaras@inbox.ru>2012-09-04 19:11:53 +0300
commit3a407bb6b73a186eafd99bcec570f88097c4b2e1 (patch)
treeea57a752c348ba0a883294855ad3c62c16e9749d /src/units.cpp
parent872fc368f7b253f26714fc47323064f270b62b40 (diff)
downloadmv-3a407bb6b73a186eafd99bcec570f88097c4b2e1.tar.gz
mv-3a407bb6b73a186eafd99bcec570f88097c4b2e1.tar.bz2
mv-3a407bb6b73a186eafd99bcec570f88097c4b2e1.tar.xz
mv-3a407bb6b73a186eafd99bcec570f88097c4b2e1.zip
Add const to more classes.
Diffstat (limited to 'src/units.cpp')
-rw-r--r--src/units.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/units.cpp b/src/units.cpp
index 3c4da47e8..52093c057 100644
--- a/src/units.cpp
+++ b/src/units.cpp
@@ -103,7 +103,7 @@ void Units::loadUnits()
}
XML::Document doc("units.xml");
- XmlNodePtr root = doc.rootNode();
+ const XmlNodePtr root = doc.rootNode();
if (!root || !xmlNameEqual(root, "units"))
{
@@ -173,7 +173,7 @@ void Units::loadUnits()
}
}
-static std::string formatUnit(int value, int type)
+static std::string formatUnit(const int value, const int type)
{
struct UnitDescription ud = units[type];
struct UnitLevel ul;
@@ -252,12 +252,12 @@ static std::string formatUnit(int value, int type)
}
}
-std::string Units::formatCurrency(int value)
+std::string Units::formatCurrency(const int value)
{
return formatUnit(value, UNIT_CURRENCY);
}
-std::string Units::formatWeight(int value)
+std::string Units::formatWeight(const int value)
{
return formatUnit(value, UNIT_WEIGHT);
}