From 4310d49ff9d286b2e0699e106adfe71cdf23a694 Mon Sep 17 00:00:00 2001 From: Aaron Franke Date: Thu, 17 Aug 2023 14:36:21 -0500 Subject: [PATCH] Remove error print from XRServer.find_interface Co-authored-by: David Snopek --- servers/xr_server.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/servers/xr_server.cpp b/servers/xr_server.cpp index bab8e9ae4b1..7e2c512554f 100644 --- a/servers/xr_server.cpp +++ b/servers/xr_server.cpp @@ -216,17 +216,12 @@ Ref XRServer::get_interface(int p_index) const { }; Ref XRServer::find_interface(const String &p_name) const { - int idx = -1; for (int i = 0; i < interfaces.size(); i++) { if (interfaces[i]->get_name() == p_name) { - idx = i; - break; + return interfaces[i]; }; }; - - ERR_FAIL_COND_V_MSG(idx == -1, nullptr, "Interface not found."); - - return interfaces[idx]; + return Ref(); }; TypedArray XRServer::get_interfaces() const {