diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-02-14 20:34:06 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-02-14 20:59:26 +0300 |
commit | bdec92381ef60cd027292ed63e254e8de70028d9 (patch) | |
tree | ebf2722cdc9fe7383a709ba1584432a491cf10ba /src/utils/files.cpp | |
parent | 5283a59db971ec2038149bf26ad9b3cbc4924449 (diff) | |
download | manaverse-bdec92381ef60cd027292ed63e254e8de70028d9.tar.gz manaverse-bdec92381ef60cd027292ed63e254e8de70028d9.tar.bz2 manaverse-bdec92381ef60cd027292ed63e254e8de70028d9.tar.xz manaverse-bdec92381ef60cd027292ed63e254e8de70028d9.zip |
In virtfs replace parameters type from char* to std::string.
Diffstat (limited to 'src/utils/files.cpp')
-rw-r--r-- | src/utils/files.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/utils/files.cpp b/src/utils/files.cpp index 57964f2f3..b2cba4c52 100644 --- a/src/utils/files.cpp +++ b/src/utils/files.cpp @@ -53,10 +53,10 @@ void Files::extractLocale() FOR_EACH (StringVectCIter, i, rootDirs->names) { const std::string dir = std::string("locale/").append(*i); - if (VirtFs::isDirectory(dir.c_str())) + if (VirtFs::isDirectory(dir)) { const std::string moFile = dir + "/LC_MESSAGES/manaplus.mo"; - if (VirtFs::exists((moFile).c_str())) + if (VirtFs::exists((moFile))) { const std::string localFile = localDir + moFile; const std::string localDir2 = localDir + dir + "/LC_MESSAGES"; @@ -114,7 +114,7 @@ void Files::copyPhysFsDir(const std::string &restrict inDir, { const std::string file = std::string(inDir).append("/").append(*i); const std::string outDir2 = std::string(outDir).append("/").append(*i); - if (VirtFs::isDirectory(file.c_str())) + if (VirtFs::isDirectory(file)) copyPhysFsDir(file, outDir2); else copyPhysFsFile(file, outDir2); @@ -214,7 +214,7 @@ void Files::getFiles(const std::string &path, StringVect &list) VirtList *const fonts = VirtFs::enumerateFiles(path); FOR_EACH (StringVectCIter, i, fonts->names) { - if (!VirtFs::isDirectory((path + *i).c_str())) + if (!VirtFs::isDirectory(path + *i)) list.push_back(*i); } VirtFs::freeList(fonts); @@ -225,7 +225,7 @@ void Files::getDirs(const std::string &path, StringVect &list) VirtList *const fonts = VirtFs::enumerateFiles(path); FOR_EACH (StringVectCIter, i, fonts->names) { - if (VirtFs::isDirectory((path + *i).c_str())) + if (VirtFs::isDirectory(path + *i)) list.push_back(*i); } VirtFs::freeList(fonts); @@ -236,7 +236,7 @@ void Files::getFilesWithDir(const std::string &path, StringVect &list) VirtList *const fonts = VirtFs::enumerateFiles(path); FOR_EACH (StringVectCIter, i, fonts->names) { - if (!VirtFs::isDirectory((path + *i).c_str())) + if (!VirtFs::isDirectory(path + *i)) list.push_back(path + *i); } VirtFs::freeList(fonts); @@ -256,7 +256,7 @@ bool Files::existsLocal(const std::string &path) std::string Files::getPath(const std::string &file) { // get the real path to the file - const char *const tmp = VirtFs::getRealDir(file.c_str()); + const char *const tmp = VirtFs::getRealDir(file); std::string path; // if the file is not in the search path, then its nullptr |