From cbd1e2106d43ce1136f64efb2f147d5e3244fb5b Mon Sep 17 00:00:00 2001 From: DragonAura Date: Wed, 1 Mar 2023 21:15:26 +0800 Subject: [PATCH] perf(CAPI): :bug: change static to constexpr --- CAPI/API/include/utils.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CAPI/API/include/utils.hpp b/CAPI/API/include/utils.hpp index ab8be4c..f302c8b 100644 --- a/CAPI/API/include/utils.hpp +++ b/CAPI/API/include/utils.hpp @@ -13,9 +13,9 @@ namespace AssistFunction { - const int numOfGridPerCell = 100; + constexpr int numOfGridPerCell = 100; - [[nodiscard]] static inline int GridToCell(int grid) noexcept + [[nodiscard]] constexpr inline int GridToCell(int grid) noexcept { return grid / numOfGridPerCell; }