summaryrefslogtreecommitdiff
path: root/src/fs/virtfs/virtfsrwops.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-03-29 22:11:59 +0300
committerAndrei Karas <akaras@inbox.ru>2017-03-29 22:11:59 +0300
commitfc31f1003bec7e0117421a8c58668e61849eeba5 (patch)
tree9cac96fdc7235a8ba51bc55460be71a6c368386f /src/fs/virtfs/virtfsrwops.cpp
parent05eecd6ecb0b094584ff6c9cf3c95642cf373a8b (diff)
downloadplus-fc31f1003bec7e0117421a8c58668e61849eeba5.tar.gz
plus-fc31f1003bec7e0117421a8c58668e61849eeba5.tar.bz2
plus-fc31f1003bec7e0117421a8c58668e61849eeba5.tar.xz
plus-fc31f1003bec7e0117421a8c58668e61849eeba5.zip
Remove leaking resources detection from virtfsrwops.
Diffstat (limited to 'src/fs/virtfs/virtfsrwops.cpp')
-rw-r--r--src/fs/virtfs/virtfsrwops.cpp24
1 files changed, 0 insertions, 24 deletions
diff --git a/src/fs/virtfs/virtfsrwops.cpp b/src/fs/virtfs/virtfsrwops.cpp
index 546c18e05..f44cc6601 100644
--- a/src/fs/virtfs/virtfsrwops.cpp
+++ b/src/fs/virtfs/virtfsrwops.cpp
@@ -60,10 +60,6 @@
#define RWOPSSIZE int
#endif // USE_SDL2
-#ifdef DUMP_LEAKED_RESOURCES
-static int openedRWops = 0;
-#endif // DUMP_LEAKED_RESOURCES
-
static RWOPSINT virtfsrwops_seek(SDL_RWops *const rw,
const RWOPSINT offset,
const int whence)
@@ -198,12 +194,6 @@ static int virtfsrwops_close(SDL_RWops *const rw)
} /* if */
SDL_FreeRW(rw);
-#ifdef DUMP_LEAKED_RESOURCES
- if (openedRWops <= 0)
- logger->assertLog("virtfsrwops_seek: closing already closed RWops");
- openedRWops --;
-#endif // DUMP_LEAKED_RESOURCES
-
return 0;
} /* virtfsrwops_close */
@@ -239,9 +229,6 @@ static SDL_RWops *create_rwops(VirtFile *const file)
retval->close = &virtfsrwops_close;
retval->hidden.unknown.data1 = file;
} /* if */
-#ifdef DUMP_LEAKED_RESOURCES
- openedRWops ++;
-#endif // DUMP_LEAKED_RESOURCES
} /* else */
return retval;
@@ -317,15 +304,4 @@ SDL_RWops *VirtFs::RWopsOpenAppend(const std::string &restrict fname)
return create_rwops(VirtFs::openAppend(fname));
} /* RWopsopenAppend */
-#ifdef DUMP_LEAKED_RESOURCES
-void VirtFs::reportRWops()
-{
- if (openedRWops)
- {
- logger->assertLog("virtfsrwops_seek: leaking RWops: %d",
- openedRWops);
- }
-}
-#endif // DUMP_LEAKED_RESOURCES
-
/* end of virtfsrwops.c ... */