summaryrefslogtreecommitdiff
path: root/src/resources/resourcemanager.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2010-01-10 17:19:24 +0200
committerThorbjørn Lindeijer <thorbjorn@lindeijer.nl>2010-01-10 17:20:33 +0100
commitf5a394a5051384a930d635da22ccafc6beb1cb84 (patch)
treed28fc14408a6bb91170e05880b4d2af6a17fcc14 /src/resources/resourcemanager.cpp
parent5757066312cab082378dbc5d8df97dea3fe40af0 (diff)
downloadmana-client-f5a394a5051384a930d635da22ccafc6beb1cb84.tar.gz
mana-client-f5a394a5051384a930d635da22ccafc6beb1cb84.tar.bz2
mana-client-f5a394a5051384a930d635da22ccafc6beb1cb84.tar.xz
mana-client-f5a394a5051384a930d635da22ccafc6beb1cb84.zip
Change code style
Diffstat (limited to 'src/resources/resourcemanager.cpp')
-rw-r--r--src/resources/resourcemanager.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/resources/resourcemanager.cpp b/src/resources/resourcemanager.cpp
index bc3267da..fe594a3f 100644
--- a/src/resources/resourcemanager.cpp
+++ b/src/resources/resourcemanager.cpp
@@ -146,7 +146,8 @@ bool ResourceManager::setWriteDir(const std::string &path)
bool ResourceManager::addToSearchPath(const std::string &path, bool append)
{
logger->log("Adding to PhysicsFS: %s", path.c_str());
- if (!PHYSFS_addToSearchPath(path.c_str(), append ? 1 : 0)) {
+ if (!PHYSFS_addToSearchPath(path.c_str(), append ? 1 : 0))
+ {
logger->log("Error: %s", PHYSFS_getLastError());
return false;
}
@@ -409,7 +410,8 @@ void *ResourceManager::loadFile(const std::string &fileName, int &fileSize)
PHYSFS_file *file = PHYSFS_openRead(fileName.c_str());
// If the handler is an invalid pointer indicate failure
- if (file == NULL) {
+ if (file == NULL)
+ {
logger->log("Warning: Failed to load %s: %s",
fileName.c_str(), PHYSFS_getLastError());
return NULL;
@@ -488,7 +490,8 @@ SDL_Surface *ResourceManager::loadSDLSurface(const std::string &filename)
void *buffer = loadFile(filename, fileSize);
SDL_Surface *tmp = NULL;
- if (buffer) {
+ if (buffer)
+ {
SDL_RWops *rw = SDL_RWFromMem(buffer, fileSize);
tmp = IMG_Load_RW(rw, 1);
::free(buffer);