From 3d64c1b5bb63303a475d0c5382480c6c23555f04 Mon Sep 17 00:00:00 2001 From: neargye Date: Mon, 7 Nov 2022 23:26:44 +0400 Subject: [PATCH] clean-up --- include/magic_enum.hpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/include/magic_enum.hpp b/include/magic_enum.hpp index 52e4d23..623591a 100644 --- a/include/magic_enum.hpp +++ b/include/magic_enum.hpp @@ -1231,7 +1231,6 @@ template if (check_value != 0 && check_value == value) { return static_cast(value); } - return {}; // Invalid value or out of range. } else { constexpr auto min = detail::min_v; constexpr auto max = detail::values_ors(); @@ -1239,8 +1238,8 @@ template if (value >= min && value <= max) { return static_cast(value); } - return {}; // Invalid value or out of range. } + return {}; // Invalid value or out of range. } else { #if defined(MAGIC_ENUM_ENABLE_HASH) return detail::constexpr_switch<&detail::values_v, detail::case_call_t::value>( @@ -1254,13 +1253,12 @@ template return static_cast(value); } } - return {}; // Invalid value or out of range. } else { if (value >= detail::min_v && value <= detail::max_v) { return static_cast(value); } - return {}; // Invalid value or out of range. } + return {}; // Invalid value or out of range. #endif } }