From ef61dc38ebe166faec414576ca943399d2a79621 Mon Sep 17 00:00:00 2001 From: neargye Date: Thu, 2 Apr 2020 17:17:27 +0500 Subject: [PATCH] clean-up --- include/magic_enum.hpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/magic_enum.hpp b/include/magic_enum.hpp index 78487c4..9dd3e91 100644 --- a/include/magic_enum.hpp +++ b/include/magic_enum.hpp @@ -162,12 +162,14 @@ constexpr bool cmp_equal(std::string_view lhs, std::string_view rhs, BinaryPredi if (lhs.size() != rhs.size()) { return false; } + const auto size = lhs.size(); for (std::size_t i = 0; i < size; ++i) { if (!p(lhs[i], rhs[i])) { return false; } } + return true; }