From bb87f2911b63eaf80e49d689bf52ecf2042ae098 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 28 May 2014 20:31:09 +0300 Subject: Move from resourcemanager functions related to files into other files. --- src/being/being.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/being/being.cpp') diff --git a/src/being/being.cpp b/src/being/being.cpp index eedb55733..e24470d1e 100644 --- a/src/being/being.cpp +++ b/src/being/being.cpp @@ -83,6 +83,7 @@ #include "gui/widgets/tabs/langtab.h" #include "utils/delete2.h" +#include "utils/files.h" #include "utils/gettext.h" #include "utils/timer.h" @@ -2932,16 +2933,14 @@ std::string Being::loadComment(const std::string &name, const int type) } str.append(stringToHexPath(name)).append("/comment.txt"); - - const ResourceManager *const resman = ResourceManager::getInstance(); - if (ResourceManager::existsLocal(str)) + if (Files::existsLocal(str)) { StringVect lines; - resman->loadTextFileLocal(str, lines); + Files::loadTextFileLocal(str, lines); if (lines.size() >= 2) return lines[1]; } - return ""; + return std::string(); } void Being::saveComment(const std::string &restrict name, @@ -2960,7 +2959,8 @@ void Being::saveComment(const std::string &restrict name, return; } dir.append(stringToHexPath(name)); - ResourceManager::saveTextFile(dir, "comment.txt", + Files::saveTextFile(dir, + "comment.txt", (name + "\n").append(comment)); } -- cgit v1.2.3-60-g2f50