From 04f3d6b491105a4f124d9738f612b9e0c505b2b0 Mon Sep 17 00:00:00 2001 From: Gary Talent Date: Thu, 29 Feb 2024 23:48:15 -0600 Subject: [PATCH] [keel] Fix some static const vars to be constexpr --- src/olympic/keel/include/keel/typeconv.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/olympic/keel/include/keel/typeconv.hpp b/src/olympic/keel/include/keel/typeconv.hpp index 6bf9756b..aa9ca388 100644 --- a/src/olympic/keel/include/keel/typeconv.hpp +++ b/src/olympic/keel/include/keel/typeconv.hpp @@ -94,16 +94,16 @@ class Converter: public BaseConverter { [[nodiscard]] bool srcMatches(ox::CRStringView pSrcTypeName, int pSrcTypeVersion) const noexcept final { - static const auto SrcTypeName = ox::requireModelTypeName(); - static const auto SrcTypeVersion = ox::requireModelTypeVersion(); + constexpr auto SrcTypeName = ox::requireModelTypeName(); + constexpr auto SrcTypeVersion = ox::requireModelTypeVersion(); return pSrcTypeName == SrcTypeName && pSrcTypeVersion == SrcTypeVersion; } [[nodiscard]] bool dstMatches(ox::CRStringView dstTypeName, int dstTypeVersion) const noexcept final { - static const auto DstTypeName = ox::StringView(ox::requireModelTypeName()); - static const auto DstTypeVersion = ox::requireModelTypeVersion(); + constexpr auto DstTypeName = ox::StringView(ox::requireModelTypeName()); + constexpr auto DstTypeVersion = ox::requireModelTypeVersion(); return dstTypeName == DstTypeName && dstTypeVersion == DstTypeVersion; }