From 617fb18d1ccbe211784df6bcf14d7c14f77c9793 Mon Sep 17 00:00:00 2001 From: cugone Date: Sat, 25 Jul 2020 16:08:09 -0500 Subject: [PATCH] *: fix C4003 NOMINMAX issue (#531) --- AUTHORS | 1 + src/entt/entity/view.hpp | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/AUTHORS b/AUTHORS index d2b9ddc841..4747e2e965 100644 --- a/AUTHORS +++ b/AUTHORS @@ -11,6 +11,7 @@ ceeac ColinH corystegel Croydon +cugone dbacchet dBagrat djarek diff --git a/src/entt/entity/view.hpp b/src/entt/entity/view.hpp index 1748b4c838..07d74a3946 100644 --- a/src/entt/entity/view.hpp +++ b/src/entt/entity/view.hpp @@ -240,7 +240,7 @@ class basic_view, Component...> { {} [[nodiscard]] const sparse_set & candidate() const ENTT_NOEXCEPT { - return *std::min({ static_cast *>(std::get *>(pools))... }, [](const auto *lhs, const auto *rhs) { + return *(std::min)({ static_cast *>(std::get *>(pools))... }, [](const auto *lhs, const auto *rhs) { return lhs->size() < rhs->size(); }); } @@ -345,7 +345,7 @@ class basic_view, Component...> { * @return Estimated number of entities iterated by the view. */ [[nodiscard]] size_type size() const ENTT_NOEXCEPT { - return std::min({ std::get *>(pools)->size()... }); + return (std::min)({ std::get *>(pools)->size()... }); } /**