summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-02-02 19:35:00 +0300
committerAndrei Karas <akaras@inbox.ru>2017-02-02 19:35:00 +0300
commitc69ae44f962101c838c85b8ceeea91adcdd33629 (patch)
tree44350f77d9e06925ca787bbbf4807d6600cfe836
parentfc28eefaed2c71a824677b613f87dc4ceaea243b (diff)
downloadmv-c69ae44f962101c838c85b8ceeea91adcdd33629.tar.gz
mv-c69ae44f962101c838c85b8ceeea91adcdd33629.tar.bz2
mv-c69ae44f962101c838c85b8ceeea91adcdd33629.tar.xz
mv-c69ae44f962101c838c85b8ceeea91adcdd33629.zip
Convert unitsdb from class to namespace.
-rw-r--r--src/resources/db/unitsdb.h57
1 files changed, 27 insertions, 30 deletions
diff --git a/src/resources/db/unitsdb.h b/src/resources/db/unitsdb.h
index 689e7a6ad..68cafe554 100644
--- a/src/resources/db/unitsdb.h
+++ b/src/resources/db/unitsdb.h
@@ -29,36 +29,33 @@
#include "localconsts.h"
-class UnitsDb final
+namespace UnitsDb
{
- public:
- A_DELETE_COPY(UnitsDb)
-
- /**
- * Loads and parses the units.xml file (if found).
- */
- static void loadUnits();
-
- static void loadXmlFile(const std::string &fileName,
- const SkipError skipError);
-
- /**
- * Formats the given number in the correct currency format.
- */
- static std::string formatCurrency(const int value) A_WARN_UNUSED;
-
- /**
- * Formats the given number in the correct currency format.
- */
- static std::string formatCurrency(std::string name,
- const int value) A_WARN_UNUSED;
-
- /**
- * Formats the given number in the correct weight/mass format.
- */
- static std::string formatWeight(const int value) A_WARN_UNUSED;
-
- static bool existsCurrency(const std::string &name) A_WARN_UNUSED;
-};
+ /**
+ * Loads and parses the units.xml file (if found).
+ */
+ void loadUnits();
+
+ void loadXmlFile(const std::string &fileName,
+ const SkipError skipError);
+
+ /**
+ * Formats the given number in the correct currency format.
+ */
+ std::string formatCurrency(const int value) A_WARN_UNUSED;
+
+ /**
+ * Formats the given number in the correct currency format.
+ */
+ std::string formatCurrency(std::string name,
+ const int value) A_WARN_UNUSED;
+
+ /**
+ * Formats the given number in the correct weight/mass format.
+ */
+ std::string formatWeight(const int value) A_WARN_UNUSED;
+
+ bool existsCurrency(const std::string &name) A_WARN_UNUSED;
+} // namespace UnitsDb
#endif // RESOURCES_DB_UNITSDB_H