From ddc0a32bbc27005fe635e550d73899a290ce603e Mon Sep 17 00:00:00 2001 From: Michele Caini Date: Mon, 2 Jul 2018 08:40:30 +0200 Subject: [PATCH] fix: runtime view (#108) --- CMakeLists.txt | 2 +- src/entt/entity/view.hpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 24d5809f9f..ed40ef85f6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -16,7 +16,7 @@ endif() # Project configuration # -project(entt VERSION 2.6.1) +project(entt VERSION 2.7.1) include(GNUInstallDirs) diff --git a/src/entt/entity/view.hpp b/src/entt/entity/view.hpp index bb2459dc68..47b0c59af1 100644 --- a/src/entt/entity/view.hpp +++ b/src/entt/entity/view.hpp @@ -1675,7 +1675,7 @@ class RuntimeView { : pools{std::move(others)} { const auto it = std::min_element(pools.begin(), pools.end(), [](const auto *lhs, const auto *rhs) { - return !lhs || (rhs && (lhs->size() < rhs->size())); + return (!lhs && rhs) || (lhs && rhs && lhs->size() < rhs->size()); }); // brings the best candidate (if any) on front of the vector