From 38ddf2f1a41e1421f24d7b104f268d3c748ba52d Mon Sep 17 00:00:00 2001 From: Caelan Sayler Date: Sun, 3 Mar 2024 16:07:02 +0000 Subject: [PATCH] cpp: don't use std::format for simple to_string --- build.cs | 3 +++ for-cpp/Velopack.cpp | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/build.cs b/build.cs index 804329c..ce8cbf5 100644 --- a/build.cs +++ b/build.cs @@ -94,6 +94,9 @@ void BuildCpp(StringBuilder sb) var outCpp = FusionBuild(sb, "for-cpp/Velopack.cpp", "CPP", includeVeloApp: false); var outHpp = Path.ChangeExtension(outCpp, ".hpp"); + // patches + ReplaceAll(outCpp, "std::format(\"{}\",", "std::to_string("); + // includes PrependFiles(outCpp, "disclaimer.txt", "subprocess.h", "velopack.cpp"); PrependFiles(outHpp, "disclaimer.txt", "velopack.hpp"); diff --git a/for-cpp/Velopack.cpp b/for-cpp/Velopack.cpp index 89676ed..21d49ed 100644 --- a/for-cpp/Velopack.cpp +++ b/for-cpp/Velopack.cpp @@ -2242,7 +2242,7 @@ std::vector UpdateManagerSync::getUpdateApplyCommand(const Velopack } if (wait) { command.push_back("--waitPid"); - command.push_back(std::format("{}", Platform::getCurrentProcessId())); + command.push_back(std::to_string( Platform::getCurrentProcessId())); } if (toApply != nullptr) { std::string packagesDir{getPackagesDir()};