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.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/resources/resourcemanager.cpp b/src/resources/resourcemanager.cpp
index 8f26cf5c..b443c715 100644
--- a/src/resources/resourcemanager.cpp
+++ b/src/resources/resourcemanager.cpp
@@ -26,11 +26,6 @@
#include <cassert>
#include <physfs.h>
-#ifdef WIN32
-#include <io.h>
-#include <direct.h>
-#endif
-
#include "image.h"
#include "music.h"
#include "soundeffect.h"
@@ -83,10 +78,12 @@ void ResourceManager::searchAndAddArchives(
const char *dirSep = PHYSFS_getDirSeparator();
char **list = PHYSFS_enumerateFiles(path.c_str());
- for (char **i = list; *i != NULL; i++) {
+ for (char **i = list; *i != NULL; i++)
+ {
size_t len = strlen(*i);
- if (len > ext.length() && !ext.compare((*i)+(len - ext.length()))) {
+ if (len > ext.length() && !ext.compare((*i)+(len - ext.length())))
+ {
std::string file, realPath, archive;
file = path + "/" + (*i);
@@ -245,7 +242,7 @@ ResourceManager::loadFile(const std::string &fileName, int &fileSize)
}
// Attempt to open the specified file using PhysicsFS
- PHYSFS_file* file = PHYSFS_openRead(fileName.c_str());
+ PHYSFS_file *file = PHYSFS_openRead(fileName.c_str());
// If the handler is an invalid pointer indicate failure
if (file == NULL) {