summaryrefslogtreecommitdiff
path: root/src/fs/virtfs
diff options
context:
space:
mode:
Diffstat (limited to 'src/fs/virtfs')
-rw-r--r--src/fs/virtfs/virtfsrwops.cpp24
-rw-r--r--src/fs/virtfs/virtfsrwops.h3
2 files changed, 0 insertions, 27 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 ... */
diff --git a/src/fs/virtfs/virtfsrwops.h b/src/fs/virtfs/virtfsrwops.h
index 107cc4265..56fda969d 100644
--- a/src/fs/virtfs/virtfsrwops.h
+++ b/src/fs/virtfs/virtfsrwops.h
@@ -59,9 +59,6 @@ namespace VirtFs
SDL_RWops *RWopsOpenAppend(const std::string &restrict fname)
A_WARN_UNUSED;
SDL_RWops *MakeRWops(VirtFile *const handle) A_WARN_UNUSED;
-#ifdef DUMP_LEAKED_RESOURCES
- void reportRWops();
-#endif // DUMP_LEAKED_RESOURCES
} // namespace VirtFs
#endif // SRC_FS_VIRTFSRWOPS_H