summaryrefslogtreecommitdiff
path: root/core/io/resource.cpp
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2022-08-29 15:04:17 +0200
committerGitHub <noreply@github.com>2022-08-29 15:04:17 +0200
commitc7e4c802ffcea465f995c4f203ace1278f41286c (patch)
tree94c85a826dac8d199c2c16c34a549b8d9a3a68ac /core/io/resource.cpp
parente60086f98b07365d6174677df84c9a22bfb56d15 (diff)
parenteb56d1d1eb6ba3fbf3cc45f603d893d8963d74f5 (diff)
Merge pull request #65031 from akien-mga/os-drop-obsolete-resource-debugging
Diffstat (limited to 'core/io/resource.cpp')
-rw-r--r--core/io/resource.cpp40
1 files changed, 0 insertions, 40 deletions
diff --git a/core/io/resource.cpp b/core/io/resource.cpp
index fec5ca5c7b..d117f86f39 100644
--- a/core/io/resource.cpp
+++ b/core/io/resource.cpp
@@ -543,43 +543,3 @@ int ResourceCache::get_cached_resource_count() {
return rc;
}
-
-void ResourceCache::dump(const char *p_file, bool p_short) {
-#ifdef DEBUG_ENABLED
- lock.lock();
-
- HashMap<String, int> type_count;
-
- Ref<FileAccess> f;
- if (p_file) {
- f = FileAccess::open(String::utf8(p_file), FileAccess::WRITE);
- ERR_FAIL_COND_MSG(f.is_null(), "Cannot create file at path '" + String::utf8(p_file) + "'.");
- }
-
- for (KeyValue<String, Resource *> &E : resources) {
- Resource *r = E.value;
-
- if (!type_count.has(r->get_class())) {
- type_count[r->get_class()] = 0;
- }
-
- type_count[r->get_class()]++;
-
- if (!p_short) {
- if (f.is_valid()) {
- f->store_line(r->get_class() + ": " + r->get_path());
- }
- }
- }
-
- for (const KeyValue<String, int> &E : type_count) {
- if (f.is_valid()) {
- f->store_line(E.key + " count: " + itos(E.value));
- }
- }
-
- lock.unlock();
-#else
- WARN_PRINT("ResourceCache::dump only with in debug builds.");
-#endif
-}