Remove error print from XRServer.find_interface

Co-authored-by: David Snopek <dsnopek@gmail.com>
This commit is contained in:
Aaron Franke 2023-08-17 14:36:21 -05:00
parent 0511f9d9a7
commit 4310d49ff9
No known key found for this signature in database
GPG Key ID: 40A1750B977E56BF
1 changed files with 2 additions and 7 deletions

View File

@ -216,17 +216,12 @@ Ref<XRInterface> XRServer::get_interface(int p_index) const {
}; };
Ref<XRInterface> XRServer::find_interface(const String &p_name) const { Ref<XRInterface> XRServer::find_interface(const String &p_name) const {
int idx = -1;
for (int i = 0; i < interfaces.size(); i++) { for (int i = 0; i < interfaces.size(); i++) {
if (interfaces[i]->get_name() == p_name) { if (interfaces[i]->get_name() == p_name) {
idx = i; return interfaces[i];
break;
}; };
}; };
return Ref<XRInterface>();
ERR_FAIL_COND_V_MSG(idx == -1, nullptr, "Interface not found.");
return interfaces[idx];
}; };
TypedArray<Dictionary> XRServer::get_interfaces() const { TypedArray<Dictionary> XRServer::get_interfaces() const {