From 12b6ee05dd6a9e308ba20e1d39ffefcc72e72762 Mon Sep 17 00:00:00 2001 From: DonutVikingChap Date: Wed, 2 Aug 2023 14:19:11 +0200 Subject: [PATCH] *: fix C++20 global module fragment inclusion (#1047) --- src/entt/core/type_info.hpp | 8 ++++---- src/entt/entity/entity.hpp | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/entt/core/type_info.hpp b/src/entt/core/type_info.hpp index bcf4977774..fb95e829f6 100644 --- a/src/entt/core/type_info.hpp +++ b/src/entt/core/type_info.hpp @@ -38,26 +38,26 @@ template } template().find_first_of('.')> -[[nodiscard]] static constexpr std::string_view type_name(int) noexcept { +[[nodiscard]] constexpr std::string_view type_name(int) noexcept { constexpr auto value = stripped_type_name(); return value; } template -[[nodiscard]] static std::string_view type_name(char) noexcept { +[[nodiscard]] std::string_view type_name(char) noexcept { static const auto value = stripped_type_name(); return value; } template().find_first_of('.')> -[[nodiscard]] static constexpr id_type type_hash(int) noexcept { +[[nodiscard]] constexpr id_type type_hash(int) noexcept { constexpr auto stripped = stripped_type_name(); constexpr auto value = hashed_string::value(stripped.data(), stripped.size()); return value; } template -[[nodiscard]] static id_type type_hash(char) noexcept { +[[nodiscard]] id_type type_hash(char) noexcept { static const auto value = [](const auto stripped) { return hashed_string::value(stripped.data(), stripped.size()); }(stripped_type_name()); diff --git a/src/entt/entity/entity.hpp b/src/entt/entity/entity.hpp index ff2260607f..8028ecaa46 100644 --- a/src/entt/entity/entity.hpp +++ b/src/entt/entity/entity.hpp @@ -18,7 +18,7 @@ namespace internal { // waiting for C++20 (and std::popcount) template -static constexpr int popcount(Type value) noexcept { +constexpr int popcount(Type value) noexcept { return value ? (int(value & 1) + popcount(value >> 1)) : 0; }