Skip to content

Commit

Permalink
Guess I'm not using std::format
Browse files Browse the repository at this point in the history
  • Loading branch information
OrfeasZ committed Aug 13, 2023
1 parent 855b9d1 commit 88e8dd6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Libraries/ResourceLib/Src/ResourceLib.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#include "Resources.h"

#include <cstring>
#include <format>

#include "ZHM/ZHMTypeInfo.h"

Expand Down Expand Up @@ -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);

Expand Down

0 comments on commit 88e8dd6

Please sign in to comment.