Skip to content

Commit

Permalink
Merge pull request #80730 from aaronfranke/xr-find-interface
Browse files Browse the repository at this point in the history
Remove error print from `XRServer.find_interface`
  • Loading branch information
akien-mga committed Aug 17, 2023
2 parents 5f24765 + 4310d49 commit d7f0f39
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions servers/xr_server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -216,17 +216,12 @@ Ref<XRInterface> XRServer::get_interface(int p_index) const {
};

Ref<XRInterface> 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<XRInterface>();
};

TypedArray<Dictionary> XRServer::get_interfaces() const {
Expand Down

0 comments on commit d7f0f39

Please sign in to comment.