From 9fe86d302838c62034c0bf6c74d8ca47722bd40b Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 26 May 2013 15:47:39 +0300 Subject: dehardcode client data configuration file names. Now names stored in paths.xml --- src/units.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/units.cpp') diff --git a/src/units.cpp b/src/units.cpp index 93e051a89..957faa998 100644 --- a/src/units.cpp +++ b/src/units.cpp @@ -22,6 +22,7 @@ #include "units.h" +#include "configuration.h" #include "logger.h" #include "utils/stringutils.h" @@ -102,12 +103,13 @@ void Units::loadUnits() units[UNIT_CURRENCY] = ud; } - XML::Document doc("units.xml"); + XML::Document doc(paths.getStringValue("unitsFile")); const XmlNodePtr root = doc.rootNode(); if (!root || !xmlNameEqual(root, "units")) { - logger->log1("Error loading unit definition file: units.xml"); + logger->log("Error loading unit definition file: " + + paths.getStringValue("unitsFile")); return; } -- cgit v1.2.3-60-g2f50