Skip to content
This repository has been archived by the owner on Oct 8, 2024. It is now read-only.

Commit

Permalink
cpp: don't use std::format for simple to_string
Browse files Browse the repository at this point in the history
  • Loading branch information
caesay committed Mar 3, 2024
1 parent 09af35c commit 38ddf2f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions build.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
2 changes: 1 addition & 1 deletion for-cpp/Velopack.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2242,7 +2242,7 @@ std::vector<std::string> 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()};
Expand Down

0 comments on commit 38ddf2f

Please sign in to comment.