From 803b6afd00b0e3574b40b866f21a0d3d01f6dc4d Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 26 Feb 2013 00:01:56 +0300 Subject: Improve string usage in other files. --- src/gui/theme.cpp | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'src/gui/theme.cpp') diff --git a/src/gui/theme.cpp b/src/gui/theme.cpp index 202bfed20..846bb45c4 100644 --- a/src/gui/theme.cpp +++ b/src/gui/theme.cpp @@ -691,13 +691,13 @@ std::string Theme::resolveThemePath(const std::string &path) } // Try the theme - file = getThemePath() + "/" + file; + file = getThemePath().append("/").append(file); if (PhysFs::exists(file.c_str())) - return getThemePath() + "/" + path; + return getThemePath().append("/").append(path); // Backup - return branding.getStringValue("guiPath") + path; + return branding.getStringValue("guiPath").append(path); } Image *Theme::getImageFromTheme(const std::string &path) @@ -967,7 +967,7 @@ void Theme::loadColors(std::string file) if (file == "") file = "colors.xml"; else - file += "/colors.xml"; + file.append("/colors.xml"); XML::Document doc(resolveThemePath(file)); const XmlNodePtr root = doc.rootNode(); @@ -1135,9 +1135,14 @@ ThemeInfo *Theme::loadInfo(const std::string &themeName) { std::string path; if (themeName.empty()) + { path = "graphics/gui/info.xml"; + } else - path = defaultThemePath + themeName + "/info.xml"; + { + path = std::string(defaultThemePath).append( + themeName).append("/info.xml"); + } logger->log("loading: " + path); XML::Document doc(path); const XmlNodePtr rootNode = doc.rootNode(); -- cgit v1.2.3-60-g2f50