Add a new HashSet template

* Intended to replace RBSet in most cases.
* Optimized for iteration speed
This commit is contained in:
reduz
2022-05-19 17:00:06 +02:00
parent 410893ad0f
commit 45af29da80
243 changed files with 1400 additions and 662 deletions

View File

@@ -223,13 +223,13 @@ Error GDScriptCache::finish_compiling(const String &p_owner) {
singleton->full_gdscript_cache[p_owner] = script.ptr();
singleton->shallow_gdscript_cache.erase(p_owner);
RBSet<String> depends = singleton->dependencies[p_owner];
HashSet<String> depends = singleton->dependencies[p_owner];
Error err = OK;
for (const RBSet<String>::Element *E = depends.front(); E != nullptr; E = E->next()) {
for (const String &E : depends) {
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);
get_full_script(E, this_err);
if (this_err != OK) {
err = this_err;