1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-09 12:50:35 +00:00

use ERR_FAIL_INDEX when preferred

This commit is contained in:
Nathan Franke
2022-05-25 11:39:00 -05:00
parent 410b6b5f7d
commit 77c8f271e7
7 changed files with 25 additions and 29 deletions

View File

@@ -75,7 +75,7 @@ void TextServerManager::remove_interface(const Ref<TextServer> &p_interface) {
};
};
ERR_FAIL_COND(idx == -1);
ERR_FAIL_COND_MSG(idx == -1, "Interface not found.");
print_verbose("TextServer: Removed interface \"" + p_interface->get_name() + "\"");
emit_signal(SNAME("interface_removed"), p_interface->get_name());
interfaces.remove_at(idx);
@@ -99,7 +99,7 @@ Ref<TextServer> TextServerManager::find_interface(const String &p_name) const {
};
};
ERR_FAIL_COND_V(idx == -1, nullptr);
ERR_FAIL_COND_V_MSG(idx == -1, nullptr, "Interface not found.");
return interfaces[idx];
}