Skip to content

Commit

Permalink
relaxed object-lookup by name -> simple pattern-match
Browse files Browse the repository at this point in the history
  • Loading branch information
crocdialer committed Nov 16, 2024
1 parent 1b2ec98 commit c3db12f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Scene.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ Object3D *Scene::any_object_by_name(const std::string_view &name) const
auto view = m_registry->view<Object3D *>();
for(const auto &[entity, object]: view.each())
{
if(object->name == name) { return object; }
if(object->name.find(name) != std::string::npos) { return object; }
}
return nullptr;
}
Expand Down

0 comments on commit c3db12f

Please sign in to comment.