summaryrefslogtreecommitdiff
path: root/src/being
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-05-28 20:31:09 +0300
committerAndrei Karas <akaras@inbox.ru>2014-05-28 20:31:09 +0300
commitbb87f2911b63eaf80e49d689bf52ecf2042ae098 (patch)
tree0778087134ec3c5a2370d417bcadb64a1dc6a9bc /src/being
parent4415cb66734e67dfcdf8924d354107d27fb70fee (diff)
downloadplus-bb87f2911b63eaf80e49d689bf52ecf2042ae098.tar.gz
plus-bb87f2911b63eaf80e49d689bf52ecf2042ae098.tar.bz2
plus-bb87f2911b63eaf80e49d689bf52ecf2042ae098.tar.xz
plus-bb87f2911b63eaf80e49d689bf52ecf2042ae098.zip
Move from resourcemanager functions related to files into other files.
Diffstat (limited to 'src/being')
-rw-r--r--src/being/being.cpp12
1 files changed, 6 insertions, 6 deletions
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));
}