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!
This commit is contained in:
@ -223,10 +223,10 @@ Error GDScriptCache::finish_compiling(const String &p_owner) {
|
||||
singleton->full_gdscript_cache[p_owner] = script.ptr();
|
||||
singleton->shallow_gdscript_cache.erase(p_owner);
|
||||
|
||||
Set<String> depends = singleton->dependencies[p_owner];
|
||||
RBSet<String> depends = singleton->dependencies[p_owner];
|
||||
|
||||
Error err = OK;
|
||||
for (const Set<String>::Element *E = depends.front(); E != nullptr; E = E->next()) {
|
||||
for (const RBSet<String>::Element *E = depends.front(); E != nullptr; E = E->next()) {
|
||||
Error this_err = OK;
|
||||
// No need to save the script. We assume it's already referenced in the owner.
|
||||
get_full_script(E->get(), this_err);
|
||||
|
||||
Reference in New Issue
Block a user