summaryrefslogtreecommitdiff
path: root/src/fs/virtfs/virtfstools.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-03-28 21:03:23 +0300
committerAndrei Karas <akaras@inbox.ru>2017-03-28 23:25:13 +0300
commit30df2c7248c2b58469aeb635a87a0ed978829c47 (patch)
tree0674f11b8f5450426cb5d7940aa203705e353702 /src/fs/virtfs/virtfstools.cpp
parent75a5173176adfc4bc417c10df137d9ea8d90d403 (diff)
downloadplus-30df2c7248c2b58469aeb635a87a0ed978829c47.tar.gz
plus-30df2c7248c2b58469aeb635a87a0ed978829c47.tar.bz2
plus-30df2c7248c2b58469aeb635a87a0ed978829c47.tar.xz
plus-30df2c7248c2b58469aeb635a87a0ed978829c47.zip
Move Virtfs::loadFile into virtfs.cpp
Diffstat (limited to 'src/fs/virtfs/virtfstools.cpp')
-rw-r--r--src/fs/virtfs/virtfstools.cpp28
1 files changed, 0 insertions, 28 deletions
diff --git a/src/fs/virtfs/virtfstools.cpp b/src/fs/virtfs/virtfstools.cpp
index c58f41b43..cc11f5022 100644
--- a/src/fs/virtfs/virtfstools.cpp
+++ b/src/fs/virtfs/virtfstools.cpp
@@ -36,34 +36,6 @@
namespace VirtFs
{
- char *loadFile(const std::string &restrict fileName,
- int &restrict fileSize)
- {
- // Attempt to open the specified file using PhysicsFS
- VirtFile *restrict const file = VirtFs::openRead(fileName);
-
- if (!file)
- {
- logger->log("Warning: Failed to load %s.",
- fileName.c_str());
- return nullptr;
- }
-
- logger->log("Loaded %s/%s",
- VirtFs::getRealDir(fileName).c_str(),
- fileName.c_str());
-
- fileSize = CAST_S32(VirtFs::fileLength(file));
- // Allocate memory and load the file
- char *restrict const buffer = new char[fileSize];
- if (fileSize > 0)
- buffer[fileSize - 1] = 0;
- VirtFs::read(file, buffer, 1, fileSize);
- VirtFs::close(file);
-
- return buffer;
- }
-
void searchAndAddArchives(const std::string &restrict path,
const std::string &restrict ext,
const Append append)