From 746dddc0673d7261f19b1e056e90e6e3a49ef33a Mon Sep 17 00:00:00 2001 From: reduz Date: Fri, 13 May 2022 15:04:37 +0200 Subject: Replace most uses of Map by HashMap * Map is unnecessary and inefficient in almost every case. * Replaced by the new HashMap. * Renamed Map to RBMap and Set to RBSet for cases that still make sense (order matters) but use is discouraged. There were very few cases where replacing by HashMap was undesired because keeping the key order was intended. I tried to keep those (as RBMap) as much as possible, but might have missed some. Review appreciated! --- tests/core/object/test_class_db.h | 2 +- tests/core/string/test_translation.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/core') diff --git a/tests/core/object/test_class_db.h b/tests/core/object/test_class_db.h index 2e316a7d95..8aaca69d13 100644 --- a/tests/core/object/test_class_db.h +++ b/tests/core/object/test_class_db.h @@ -519,7 +519,7 @@ void add_exposed_classes(Context &r_context) { List property_list; ClassDB::get_property_list(class_name, &property_list, true); - Map accessor_methods; + HashMap accessor_methods; for (const PropertyInfo &property : property_list) { if (property.usage & PROPERTY_USAGE_GROUP || property.usage & PROPERTY_USAGE_SUBGROUP || property.usage & PROPERTY_USAGE_CATEGORY || (property.type == Variant::NIL && property.usage & PROPERTY_USAGE_ARRAY)) { diff --git a/tests/core/string/test_translation.h b/tests/core/string/test_translation.h index 85ac639bec..0a1903ccbf 100644 --- a/tests/core/string/test_translation.h +++ b/tests/core/string/test_translation.h @@ -154,7 +154,7 @@ TEST_CASE("[OptimizedTranslation] Generate from Translation and read messages") TEST_CASE("[Translation] CSV import") { Ref import_csv_translation = memnew(ResourceImporterCSVTranslation); - Map options; + HashMap options; options["compress"] = false; options["delimiter"] = 0; -- cgit v1.2.3