summaryrefslogtreecommitdiff
path: root/core/templates
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2022-10-04 10:22:24 +0200
committerRémi Verschelde <rverschelde@gmail.com>2022-10-04 10:22:24 +0200
commitcd7f172cf8b5706db08633662711fcc6027086bd (patch)
tree219d6924926c3cfb2bfc367c244501fde01ef74a /core/templates
parent34e0e7de58ba4e7f2e4954266de8f13d5eb44c56 (diff)
parent82b87d7a17c39617c7e84065250be77135077e81 (diff)
Merge pull request #66804 from akien-mga/core-remove-NO_SAFE_CAST
Remove unsupported `NO_SAFE_CAST`/`-fno-rtti` from Android build
Diffstat (limited to 'core/templates')
-rw-r--r--core/templates/rid_owner.h11
1 files changed, 2 insertions, 9 deletions
diff --git a/core/templates/rid_owner.h b/core/templates/rid_owner.h
index 320faebe98..a83ffa575f 100644
--- a/core/templates/rid_owner.h
+++ b/core/templates/rid_owner.h
@@ -335,15 +335,8 @@ public:
~RID_Alloc() {
if (alloc_count) {
- if (description) {
- print_error("ERROR: " + itos(alloc_count) + " RID allocations of type '" + description + "' were leaked at exit.");
- } else {
-#ifdef NO_SAFE_CAST
- print_error("ERROR: " + itos(alloc_count) + " RID allocations of type 'unknown' were leaked at exit.");
-#else
- print_error("ERROR: " + itos(alloc_count) + " RID allocations of type '" + typeid(T).name() + "' were leaked at exit.");
-#endif
- }
+ print_error(vformat("ERROR: %d RID allocations of type '%s' were leaked at exit.",
+ alloc_count, description ? description : typeid(T).name()));
for (size_t i = 0; i < max_alloc; i++) {
uint64_t validator = validator_chunks[i / elements_in_chunk][i % elements_in_chunk];