From 3a407bb6b73a186eafd99bcec570f88097c4b2e1 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 4 Sep 2012 19:11:53 +0300 Subject: Add const to more classes. --- src/units.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/units.cpp') 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); } -- cgit v1.2.3-70-g09d2