summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-02-11 00:00:44 +0300
committerAndrei Karas <akaras@inbox.ru>2017-02-11 00:00:44 +0300
commit380ae136f98671a81feb6095a66ac5401b1ff29e (patch)
treed2045b521e3f4be78524d551165bd6defd25ec39 /src
parentc218293c2fe001c23099e73bf9276fe295a7e682 (diff)
downloadplus-380ae136f98671a81feb6095a66ac5401b1ff29e.tar.gz
plus-380ae136f98671a81feb6095a66ac5401b1ff29e.tar.bz2
plus-380ae136f98671a81feb6095a66ac5401b1ff29e.tar.xz
plus-380ae136f98671a81feb6095a66ac5401b1ff29e.zip
Rename define DEBUG_PHYSFS into DEBUG_VIRTFS
Diffstat (limited to 'src')
-rw-r--r--src/debug.h4
-rw-r--r--src/localconsts.h2
-rw-r--r--src/maingui.cpp4
-rw-r--r--src/utils/debugmemoryobject.h4
-rw-r--r--src/utils/virtfsrwops.cpp26
-rw-r--r--src/utils/virtfsrwops.h10
6 files changed, 23 insertions, 27 deletions
diff --git a/src/debug.h b/src/debug.h
index edfe0408d..47ccfc2bb 100644
--- a/src/debug.h
+++ b/src/debug.h
@@ -64,8 +64,6 @@
#endif // ENABLE_SDL_DEBUG
-#ifdef DEBUG_PHYSFS
+#ifdef DEBUG_VIRTFS
#define RWopsOpenRead(name) RWopsOpenRead(name, __FILE__, __LINE__)
-#else // DEBUG_PHYSFS
-
#endif // DEBUG_PHYSFS
diff --git a/src/localconsts.h b/src/localconsts.h
index 072b063d0..11c120ee2 100644
--- a/src/localconsts.h
+++ b/src/localconsts.h
@@ -338,7 +338,7 @@ PRAGMA45(GCC diagnostic pop)
// #define DEBUG_SDL_SURFACES 1
// debug RWops usage
-// #define DEBUG_PHYSFS 1
+// #define DEBUG_VIRTFS 1
// use file access fuzzer
// #define USE_FUZZER 1
diff --git a/src/maingui.cpp b/src/maingui.cpp
index f34cfeb31..a8a06cf9a 100644
--- a/src/maingui.cpp
+++ b/src/maingui.cpp
@@ -133,9 +133,9 @@ int mainGui(int argc, char *argv[])
#ifdef DUMP_LEAKED_RESOURCES
VirtFs::reportRWops();
#endif // DUMP_LEAKED_RESOURCES
-#ifdef DEBUG_PHYSFS
+#ifdef DEBUG_VIRTFS
VirtFs::reportLeaks();
-#endif // DEBUG_PHYSFS
+#endif // DEBUG_VIRTFS
return ret;
}
diff --git a/src/utils/debugmemoryobject.h b/src/utils/debugmemoryobject.h
index 3f1f0501e..e415cb59e 100644
--- a/src/utils/debugmemoryobject.h
+++ b/src/utils/debugmemoryobject.h
@@ -21,7 +21,7 @@
#ifndef UTILS_DEBUGMEMORYOBJECT_H
#define UTILS_DEBUGMEMORYOBJECT_H
-#ifdef DEBUG_PHYSFS
+#ifdef DEBUG_VIRTFS
#include "utils/stringutils.h"
@@ -46,5 +46,5 @@ namespace VirtFs
};
} // VirtFs
-#endif // DEBUG_PHYSFS
+#endif // DEBUG_VIRTFS
#endif // UTILS_DEBUGMEMORYOBJECT_H
diff --git a/src/utils/virtfsrwops.cpp b/src/utils/virtfsrwops.cpp
index 81c8b4726..b6f7feec8 100644
--- a/src/utils/virtfsrwops.cpp
+++ b/src/utils/virtfsrwops.cpp
@@ -45,7 +45,7 @@
static int openedRWops = 0;
#endif // DUMP_LEAKED_RESOURCES
-#ifdef DEBUG_PHYSFS
+#ifdef DEBUG_VIRTFS
namespace
{
std::map<void*, VirtFs::DebugMemoryObject*> mRWops;
@@ -105,7 +105,7 @@ void VirtFs::reportLeaks()
mRWops.clear();
}
}
-#endif // DEBUG_PHYSFS
+#endif // DEBUG_VIRTFS
static PHYSFSINT physfsrwops_seek(SDL_RWops *const rw,
const PHYSFSINT offset,
@@ -251,9 +251,9 @@ static int physfsrwops_close(SDL_RWops *const rw)
logger->assertLog("physfsrwops_seek: closing already closed RWops");
openedRWops --;
#endif // DUMP_LEAKED_RESOURCES
-#ifdef DEBUG_PHYSFS
+#ifdef DEBUG_VIRTFS
deleteDebugRWops(rw);
-#endif // DEBUG_PHYSFS
+#endif // DEBUG_VIRTFS
return 0;
} /* physfsrwops_close */
@@ -326,14 +326,14 @@ static bool checkFilePath(const char *const fname)
}
#endif // __APPLE__
-#ifdef DEBUG_PHYSFS
+#ifdef DEBUG_VIRTFS
#undef RWopsOpenRead
SDL_RWops *VirtFs::RWopsOpenRead(const char *const fname,
const char *restrict const file,
const unsigned line)
-#else // DEBUG_PHYSFS
+#else // DEBUG_VIRTFS
SDL_RWops *VirtFs::RWopsOpenRead(const char *const fname)
-#endif // DEBUG_PHYSFS
+#endif // DEBUG_VIRTFS
{
BLOCK_START("RWopsopenRead")
#ifdef __APPLE__
@@ -346,29 +346,29 @@ SDL_RWops *VirtFs::RWopsOpenRead(const char *const fname)
#endif // USE_FUZZER
#ifdef USE_PROFILER
-#ifdef DEBUG_PHYSFS
+#ifdef DEBUG_VIRTFS
SDL_RWops *const ret = addDebugRWops(
create_rwops(VirtFs::openRead(fname)),
fname,
file,
line);
-#else // DEBUG_PHYSFS
+#else // DEBUG_VIRTFS
SDL_RWops *const ret = create_rwops(VirtFs::openRead(fname));
-#endif // DEBUG_PHYSFS
+#endif // DEBUG_VIRTFS
BLOCK_END("RWopsopenRead")
return ret;
#else // USE_PROFILER
-#ifdef DEBUG_PHYSFS
+#ifdef DEBUG_VIRTFS
return addDebugRWops(
create_rwops(VirtFs::openRead(fname)),
fname,
file,
line);
-#else // DEBUG_PHYSFS
+#else // DEBUG_VIRTFS
return create_rwops(VirtFs::openRead(fname));
-#endif // DEBUG_PHYSFS
+#endif // DEBUG_VIRTFS
#endif // USE_PROFILER
} /* RWopsopenRead */
diff --git a/src/utils/virtfsrwops.h b/src/utils/virtfsrwops.h
index e9d68f044..a1b073454 100644
--- a/src/utils/virtfsrwops.h
+++ b/src/utils/virtfsrwops.h
@@ -33,13 +33,14 @@
namespace VirtFs
{
-#ifdef DEBUG_PHYSFS
+#ifdef DEBUG_VIRTFS
SDL_RWops *RWopsOpenRead(const char *const fname,
const char *restrict const file,
const unsigned line);
-#else // DEBUG_PHYSFS
+ void reportLeaks();
+#else // DEBUG_VIRTFS
SDL_RWops *RWopsOpenRead(const char *const fname);
-#endif // DEBUG_PHYSFS
+#endif // DEBUG_VIRTFS
SDL_RWops *RWopsOpenWrite(const char *const fname) A_WARN_UNUSED;
SDL_RWops *RWopsOpenAppend(const char *const fname) A_WARN_UNUSED;
@@ -47,9 +48,6 @@ namespace VirtFs
#ifdef DUMP_LEAKED_RESOURCES
void reportRWops();
#endif // DUMP_LEAKED_RESOURCES
-#ifdef DEBUG_PHYSFS
- void reportLeaks();
-#endif // DEBUG_PHYSFS
} // namespace VirtFs
#endif // UTILS_PHYSFSRWOPS_H