From c69ae44f962101c838c85b8ceeea91adcdd33629 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 2 Feb 2017 19:35:00 +0300 Subject: Convert unitsdb from class to namespace. --- src/resources/db/unitsdb.h | 57 ++++++++++++++++++++++------------------------ 1 file changed, 27 insertions(+), 30 deletions(-) (limited to 'src/resources') 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 -- cgit v1.2.3-70-g09d2