summaryrefslogtreecommitdiff
path: root/src/resources/resourcemanager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/resources/resourcemanager.cpp')
-rw-r--r--src/resources/resourcemanager.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/resources/resourcemanager.cpp b/src/resources/resourcemanager.cpp
index a99ca622e..c7552b9b7 100644
--- a/src/resources/resourcemanager.cpp
+++ b/src/resources/resourcemanager.cpp
@@ -634,18 +634,17 @@ bool ResourceManager::copyFile(const std::string &src, const std::string &dst)
return true;
}
-std::vector<std::string> ResourceManager::loadTextFile(
- const std::string &fileName)
+bool ResourceManager::loadTextFile(const std::string &fileName,
+ std::vector<std::string> &lines)
{
int contentsLength;
char *fileContents = static_cast<char*>(
loadFile(fileName, contentsLength));
- std::vector<std::string> lines;
if (!fileContents)
{
logger->log("Couldn't load text file: %s", fileName.c_str());
- return lines;
+ return false;
}
std::istringstream iss(std::string(fileContents, contentsLength));
@@ -655,7 +654,7 @@ std::vector<std::string> ResourceManager::loadTextFile(
lines.push_back(line);
free(fileContents);
- return lines;
+ return true;
}
std::vector<std::string> ResourceManager::loadTextFileLocal(