From e48458777820ec036fa17e028ef7633a76e873ee Mon Sep 17 00:00:00 2001 From: WerWolv Date: Sun, 16 Feb 2025 20:08:10 +0100 Subject: [PATCH] fix: Don't parse version string on every call --- lib/libimhex/source/api/imhex_api.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/libimhex/source/api/imhex_api.cpp b/lib/libimhex/source/api/imhex_api.cpp index 1493880ea..ae389b0d8 100644 --- a/lib/libimhex/source/api/imhex_api.cpp +++ b/lib/libimhex/source/api/imhex_api.cpp @@ -872,7 +872,8 @@ namespace hex { SemanticVersion getImHexVersion() { #if defined IMHEX_VERSION - return SemanticVersion(IMHEX_VERSION); + static auto version = SemanticVersion(IMHEX_VERSION); + return version; #else return {}; #endif