mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 03:48:13 +00:00
62 lines
2.4 KiB
Diff
62 lines
2.4 KiB
Diff
From f9a88260a01aff91971ca88030b74e916a5daa39 Mon Sep 17 00:00:00 2001
|
|
From: AnotherTest <ali.mpfard@gmail.com>
|
|
Date: Thu, 11 Feb 2021 19:25:37 +0330
|
|
Subject: [PATCH 02/11] stoi -> atoi
|
|
|
|
---
|
|
Source/cmForEachCommand.cxx | 2 +-
|
|
Source/cmStandardLevelResolver.cxx | 4 ++--
|
|
Source/cmVSSetupHelper.cxx | 2 +-
|
|
3 files changed, 4 insertions(+), 4 deletions(-)
|
|
|
|
diff --git a/Source/cmForEachCommand.cxx b/Source/cmForEachCommand.cxx
|
|
index bcacb15..c74cbdb 100644
|
|
--- a/Source/cmForEachCommand.cxx
|
|
+++ b/Source/cmForEachCommand.cxx
|
|
@@ -359,7 +359,7 @@ bool HandleInMode(std::vector<std::string> const& args,
|
|
bool TryParseInteger(cmExecutionStatus& status, const std::string& str, int& i)
|
|
{
|
|
try {
|
|
- i = std::stoi(str);
|
|
+ i = atoi((str).c_str());
|
|
} catch (std::invalid_argument&) {
|
|
std::ostringstream e;
|
|
e << "Invalid integer: '" << str << "'";
|
|
diff --git a/Source/cmStandardLevelResolver.cxx b/Source/cmStandardLevelResolver.cxx
|
|
index 8672f61..c418b09 100644
|
|
--- a/Source/cmStandardLevelResolver.cxx
|
|
+++ b/Source/cmStandardLevelResolver.cxx
|
|
@@ -116,7 +116,7 @@ struct StanardLevelComputer
|
|
int standardValue = -1;
|
|
int defaultValue = -1;
|
|
try {
|
|
- standardValue = std::stoi(standardStr);
|
|
+ standardValue = atoi((standardStr).c_str());
|
|
defaultValue = std::stoi(*defaultStd);
|
|
} catch (std::invalid_argument&) {
|
|
// fall through as we want an error
|
|
@@ -532,7 +532,7 @@ bool cmStandardLevelResolver::IsLaterStandard(std::string const& lang,
|
|
{
|
|
auto mapping = StandardComputerMapping.find(lang);
|
|
if (mapping != cm::cend(StandardComputerMapping)) {
|
|
- return mapping->second.IsLaterStandard(std::stoi(lhs), std::stoi(rhs));
|
|
+ return mapping->second.IsLaterStandard(atoi((lhs).c_str()), atoi((rhs).c_str()));
|
|
}
|
|
return false;
|
|
}
|
|
diff --git a/Source/cmVSSetupHelper.cxx b/Source/cmVSSetupHelper.cxx
|
|
index 6aa0d15..a4dac5e 100644
|
|
--- a/Source/cmVSSetupHelper.cxx
|
|
+++ b/Source/cmVSSetupHelper.cxx
|
|
@@ -318,7 +318,7 @@ bool cmVSSetupAPIHelper::EnumerateAndChooseVSInstance()
|
|
chosenInstanceInfo.Version =
|
|
std::string(envVSVersion.begin(), envVSVersion.end());
|
|
chosenInstanceInfo.VCToolsetVersion = envVSVersion;
|
|
- chosenInstanceInfo.ullVersion = std::stoi(envVSVersion);
|
|
+ chosenInstanceInfo.ullVersion = atoi((envVSVersion).c_str());
|
|
chosenInstanceInfo.IsWin10SDKInstalled = true;
|
|
chosenInstanceInfo.IsWin81SDKInstalled = !envWindowsSdkDir81.empty();
|
|
return true;
|
|
--
|
|
2.30.1
|
|
|