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

@@ -184,7 +184,7 @@ void XRServer::remove_interface(const Ref<XRInterface> &p_interface) {
};
};
ERR_FAIL_COND(idx == -1);
ERR_FAIL_COND_MSG(idx == -1, "Interface not found.");
print_verbose("XR: Removed interface" + p_interface->get_name());
@@ -211,7 +211,7 @@ Ref<XRInterface> XRServer::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];
};