From 88e8dd6c6cc00276fb5da6013c13b02ef081e81b Mon Sep 17 00:00:00 2001 From: OrfeasZ Date: Sun, 13 Aug 2023 04:00:43 +0300 Subject: [PATCH] Guess I'm not using std::format --- Libraries/ResourceLib/Src/ResourceLib.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Libraries/ResourceLib/Src/ResourceLib.cpp b/Libraries/ResourceLib/Src/ResourceLib.cpp index 8e8269a..cb16048 100644 --- a/Libraries/ResourceLib/Src/ResourceLib.cpp +++ b/Libraries/ResourceLib/Src/ResourceLib.cpp @@ -3,7 +3,6 @@ #include "Resources.h" #include -#include #include "ZHM/ZHMTypeInfo.h" @@ -131,7 +130,8 @@ extern "C" { // simdjson doesn't support treating scalar document as values, so we have to cheat by wrapping it in an array, // parsing it again, and then extracting the first element as a value. - auto s_ArrayJson = simdjson::padded_string(std::format("[{}]", std::string_view(p_JsonStr, p_JsonStrLength))); + const std::string s_ArrayJsonString = "[" + std::string(p_JsonStr, p_JsonStrLength) + "]"; + const auto s_ArrayJson = simdjson::padded_string(s_ArrayJsonString); simdjson::ondemand::document s_ArrayValue = s_Parser.iterate(s_ArrayJson); simdjson::ondemand::value s_RealValue = s_ArrayValue.at(0);