diff --git a/CMakeLists.txt b/CMakeLists.txt index 2a64798..dbbaa2d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -29,7 +29,6 @@ include_directories(${CMAKE_BINARY_DIR}/generated) -# --- Output directories for multi-config builds --- foreach(OUTPUTCONFIG IN ITEMS Debug Release) string(TOUPPER ${OUTPUTCONFIG} OUTPUTCONFIG_UPPER) set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_${OUTPUTCONFIG_UPPER} ${CMAKE_BINARY_DIR}/bin/${OUTPUTCONFIG}) diff --git a/src/core/systems/Scene/Scene.cpp b/src/core/systems/Scene/Scene.cpp index 64f575b..7d6e2a5 100644 --- a/src/core/systems/Scene/Scene.cpp +++ b/src/core/systems/Scene/Scene.cpp @@ -14,10 +14,10 @@ namespace OX bool Scene::removeRootObject(GameObject *go) { - auto it = std::find_if( - m_roots.begin(), m_roots.end(), - [go](const std::unique_ptr &u) { return u.get() == go; } + auto it = std::ranges::find_if(m_roots, + [go](const std::unique_ptr &u) { return u.get() == go; } ); + if (it == m_roots.end()) return false; diff --git a/src/core/systems/Scene/Scene.h b/src/core/systems/Scene/Scene.h index d5c85ac..ea9b676 100644 --- a/src/core/systems/Scene/Scene.h +++ b/src/core/systems/Scene/Scene.h @@ -19,7 +19,7 @@ namespace OX ~Scene() = default; - /// Create and own a new root GameObject. Returns the raw pointer. + /// Create a new root GameObject. Returns the raw pointer. GameObject *createRootObject(const std::string &name = ""); /// Remove (and destroy) a root object by pointer.