diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2022-02-05 20:26:34 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-05 20:26:34 +0100 |
commit | 9d1626b4d7a867b4778845dd12519c603f0cf88f (patch) | |
tree | 1bca37a1f0941d61a505b1be27f6dd6f345b8af6 /core/string/string_name.cpp | |
parent | bd32dd4a48ba0008dc72c8dcd75f8d41bc510aba (diff) | |
parent | 0e659b423095b494cca2eb9fb9b91cc246ac4380 (diff) |
Merge pull request #57017 from godotengine/string-name-static-false-unclaimed
Diffstat (limited to 'core/string/string_name.cpp')
-rw-r--r-- | core/string/string_name.cpp | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/core/string/string_name.cpp b/core/string/string_name.cpp index 61742ac582..11674629fc 100644 --- a/core/string/string_name.cpp +++ b/core/string/string_name.cpp @@ -84,12 +84,15 @@ void StringName::cleanup() { for (int i = 0; i < STRING_TABLE_LEN; i++) { while (_table[i]) { _Data *d = _table[i]; - lost_strings++; - if (d->static_count.get() != d->refcount.get() && OS::get_singleton()->is_stdout_verbose()) { - if (d->cname) { - print_line("Orphan StringName: " + String(d->cname)); - } else { - print_line("Orphan StringName: " + String(d->name)); + if (d->static_count.get() != d->refcount.get()) { + lost_strings++; + + if (OS::get_singleton()->is_stdout_verbose()) { + if (d->cname) { + print_line("Orphan StringName: " + String(d->cname)); + } else { + print_line("Orphan StringName: " + String(d->name)); + } } } |