diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-02-11 00:00:44 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-02-11 00:00:44 +0300 |
commit | 380ae136f98671a81feb6095a66ac5401b1ff29e (patch) | |
tree | d2045b521e3f4be78524d551165bd6defd25ec39 /src/utils | |
parent | c218293c2fe001c23099e73bf9276fe295a7e682 (diff) | |
download | mv-380ae136f98671a81feb6095a66ac5401b1ff29e.tar.gz mv-380ae136f98671a81feb6095a66ac5401b1ff29e.tar.bz2 mv-380ae136f98671a81feb6095a66ac5401b1ff29e.tar.xz mv-380ae136f98671a81feb6095a66ac5401b1ff29e.zip |
Rename define DEBUG_PHYSFS into DEBUG_VIRTFS
Diffstat (limited to 'src/utils')
-rw-r--r-- | src/utils/debugmemoryobject.h | 4 | ||||
-rw-r--r-- | src/utils/virtfsrwops.cpp | 26 | ||||
-rw-r--r-- | src/utils/virtfsrwops.h | 10 |
3 files changed, 19 insertions, 21 deletions
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 |