From df442f368f1d8b65998b7173ef0a6c46b8602f3a Mon Sep 17 00:00:00 2001 From: Foereaper Date: Mon, 5 Aug 2024 22:47:08 +0200 Subject: [PATCH] Replace lambda in SetMethods with holds_alternative --- ElunaTemplate.h | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/ElunaTemplate.h b/ElunaTemplate.h index 9ebab5f18f..9cb447e4ff 100644 --- a/ElunaTemplate.h +++ b/ElunaTemplate.h @@ -284,14 +284,8 @@ class ElunaTemplate ASSERT(methodTable); // determine if the method table functions are global or non-global - bool isGlobal = false; const auto& firstMethod = methodTable[0]; - std::visit([&isGlobal](auto&& func) - { - using FuncType = std::decay_t; - if constexpr (std::is_same_v) - isGlobal = true; - }, firstMethod.mfunc); + bool isGlobal = std::holds_alternative(firstMethod.mfunc); if (isGlobal) {