ladybird/Ports/cmake/patches/0005-stod.patch
AnotherTest 80d6f46d4e Ports: Add a cmake port
Yes, you build this *inside* serenity.
2021-02-15 17:32:56 +01:00

208 lines
7.9 KiB
Diff

From edc401ceb014f8ec5d80d3d2b7b7e9c1e86a27ed Mon Sep 17 00:00:00 2001
From: AnotherTest <ali.mpfard@gmail.com>
Date: Thu, 11 Feb 2021 21:22:45 +0330
Subject: [PATCH 05/11] stod
---
Help/guide/importing-exporting/Downstream/main.cc | 2 +-
Help/guide/importing-exporting/DownstreamComponents/main.cc | 2 +-
Help/guide/tutorial/Complete/tutorial.cxx | 2 +-
Help/guide/tutorial/Step10/tutorial.cxx | 2 +-
Help/guide/tutorial/Step11/tutorial.cxx | 2 +-
Help/guide/tutorial/Step12/tutorial.cxx | 2 +-
Help/guide/tutorial/Step2/tutorial.cxx | 2 +-
Help/guide/tutorial/Step3/tutorial.cxx | 2 +-
Help/guide/tutorial/Step4/tutorial.cxx | 2 +-
Help/guide/tutorial/Step5/tutorial.cxx | 2 +-
Help/guide/tutorial/Step6/tutorial.cxx | 2 +-
Help/guide/tutorial/Step7/tutorial.cxx | 2 +-
Help/guide/tutorial/Step8/tutorial.cxx | 2 +-
Help/guide/tutorial/Step9/tutorial.cxx | 2 +-
14 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/Help/guide/importing-exporting/Downstream/main.cc b/Help/guide/importing-exporting/Downstream/main.cc
index 8574373..0956348 100644
--- a/Help/guide/importing-exporting/Downstream/main.cc
+++ b/Help/guide/importing-exporting/Downstream/main.cc
@@ -12,7 +12,7 @@ int main(int argc, char* argv[])
}
// convert input to double
- const double inputValue = std::stod(argv[1]);
+ const double inputValue = strtod(argv[1].c_str(), nullptr);
// calculate square root
const double sqrt = MathFunctions::sqrt(inputValue);
diff --git a/Help/guide/importing-exporting/DownstreamComponents/main.cc b/Help/guide/importing-exporting/DownstreamComponents/main.cc
index f5e8fa6..9f8be40 100644
--- a/Help/guide/importing-exporting/DownstreamComponents/main.cc
+++ b/Help/guide/importing-exporting/DownstreamComponents/main.cc
@@ -13,7 +13,7 @@ int main(int argc, char* argv[])
}
// convert input to double
- const double inputValue = std::stod(argv[1]);
+ const double inputValue = strtod(argv[1].c_str(), nullptr);
// calculate square root
const double sqrt = MathFunctions::sqrt(inputValue);
diff --git a/Help/guide/tutorial/Complete/tutorial.cxx b/Help/guide/tutorial/Complete/tutorial.cxx
index a4f44d5..06627a9 100644
--- a/Help/guide/tutorial/Complete/tutorial.cxx
+++ b/Help/guide/tutorial/Complete/tutorial.cxx
@@ -16,7 +16,7 @@ int main(int argc, char* argv[])
}
// convert input to double
- const double inputValue = std::stod(argv[1]);
+ const double inputValue = strtod(argv[1].c_str(), nullptr);
const double outputValue = mathfunctions::sqrt(inputValue);
diff --git a/Help/guide/tutorial/Step10/tutorial.cxx b/Help/guide/tutorial/Step10/tutorial.cxx
index 37a0333..553f35a 100644
--- a/Help/guide/tutorial/Step10/tutorial.cxx
+++ b/Help/guide/tutorial/Step10/tutorial.cxx
@@ -17,7 +17,7 @@ int main(int argc, char* argv[])
}
// convert input to double
- const double inputValue = std::stod(argv[1]);
+ const double inputValue = strtod(argv[1].c_str(), nullptr);
const double outputValue = mathfunctions::sqrt(inputValue);
diff --git a/Help/guide/tutorial/Step11/tutorial.cxx b/Help/guide/tutorial/Step11/tutorial.cxx
index a4f44d5..06627a9 100644
--- a/Help/guide/tutorial/Step11/tutorial.cxx
+++ b/Help/guide/tutorial/Step11/tutorial.cxx
@@ -16,7 +16,7 @@ int main(int argc, char* argv[])
}
// convert input to double
- const double inputValue = std::stod(argv[1]);
+ const double inputValue = strtod(argv[1].c_str(), nullptr);
const double outputValue = mathfunctions::sqrt(inputValue);
diff --git a/Help/guide/tutorial/Step12/tutorial.cxx b/Help/guide/tutorial/Step12/tutorial.cxx
index a4f44d5..06627a9 100644
--- a/Help/guide/tutorial/Step12/tutorial.cxx
+++ b/Help/guide/tutorial/Step12/tutorial.cxx
@@ -16,7 +16,7 @@ int main(int argc, char* argv[])
}
// convert input to double
- const double inputValue = std::stod(argv[1]);
+ const double inputValue = strtod(argv[1].c_str(), nullptr);
const double outputValue = mathfunctions::sqrt(inputValue);
diff --git a/Help/guide/tutorial/Step2/tutorial.cxx b/Help/guide/tutorial/Step2/tutorial.cxx
index 53b0810..7ab6adb 100644
--- a/Help/guide/tutorial/Step2/tutorial.cxx
+++ b/Help/guide/tutorial/Step2/tutorial.cxx
@@ -16,7 +16,7 @@ int main(int argc, char* argv[])
}
// convert input to double
- const double inputValue = std::stod(argv[1]);
+ const double inputValue = strtod(argv[1].c_str(), nullptr);
// calculate square root
const double outputValue = sqrt(inputValue);
diff --git a/Help/guide/tutorial/Step3/tutorial.cxx b/Help/guide/tutorial/Step3/tutorial.cxx
index b3c6a4f..7bfb60b 100644
--- a/Help/guide/tutorial/Step3/tutorial.cxx
+++ b/Help/guide/tutorial/Step3/tutorial.cxx
@@ -21,7 +21,7 @@ int main(int argc, char* argv[])
}
// convert input to double
- const double inputValue = std::stod(argv[1]);
+ const double inputValue = strtod(argv[1].c_str(), nullptr);
// which square root function should we use?
#ifdef USE_MYMATH
diff --git a/Help/guide/tutorial/Step4/tutorial.cxx b/Help/guide/tutorial/Step4/tutorial.cxx
index b3c6a4f..7bfb60b 100644
--- a/Help/guide/tutorial/Step4/tutorial.cxx
+++ b/Help/guide/tutorial/Step4/tutorial.cxx
@@ -21,7 +21,7 @@ int main(int argc, char* argv[])
}
// convert input to double
- const double inputValue = std::stod(argv[1]);
+ const double inputValue = strtod(argv[1].c_str(), nullptr);
// which square root function should we use?
#ifdef USE_MYMATH
diff --git a/Help/guide/tutorial/Step5/tutorial.cxx b/Help/guide/tutorial/Step5/tutorial.cxx
index b3c6a4f..7bfb60b 100644
--- a/Help/guide/tutorial/Step5/tutorial.cxx
+++ b/Help/guide/tutorial/Step5/tutorial.cxx
@@ -21,7 +21,7 @@ int main(int argc, char* argv[])
}
// convert input to double
- const double inputValue = std::stod(argv[1]);
+ const double inputValue = strtod(argv[1].c_str(), nullptr);
// which square root function should we use?
#ifdef USE_MYMATH
diff --git a/Help/guide/tutorial/Step6/tutorial.cxx b/Help/guide/tutorial/Step6/tutorial.cxx
index b3c6a4f..7bfb60b 100644
--- a/Help/guide/tutorial/Step6/tutorial.cxx
+++ b/Help/guide/tutorial/Step6/tutorial.cxx
@@ -21,7 +21,7 @@ int main(int argc, char* argv[])
}
// convert input to double
- const double inputValue = std::stod(argv[1]);
+ const double inputValue = strtod(argv[1].c_str(), nullptr);
// which square root function should we use?
#ifdef USE_MYMATH
diff --git a/Help/guide/tutorial/Step7/tutorial.cxx b/Help/guide/tutorial/Step7/tutorial.cxx
index b3c6a4f..7bfb60b 100644
--- a/Help/guide/tutorial/Step7/tutorial.cxx
+++ b/Help/guide/tutorial/Step7/tutorial.cxx
@@ -21,7 +21,7 @@ int main(int argc, char* argv[])
}
// convert input to double
- const double inputValue = std::stod(argv[1]);
+ const double inputValue = strtod(argv[1].c_str(), nullptr);
// which square root function should we use?
#ifdef USE_MYMATH
diff --git a/Help/guide/tutorial/Step8/tutorial.cxx b/Help/guide/tutorial/Step8/tutorial.cxx
index b3c6a4f..7bfb60b 100644
--- a/Help/guide/tutorial/Step8/tutorial.cxx
+++ b/Help/guide/tutorial/Step8/tutorial.cxx
@@ -21,7 +21,7 @@ int main(int argc, char* argv[])
}
// convert input to double
- const double inputValue = std::stod(argv[1]);
+ const double inputValue = strtod(argv[1].c_str(), nullptr);
// which square root function should we use?
#ifdef USE_MYMATH
diff --git a/Help/guide/tutorial/Step9/tutorial.cxx b/Help/guide/tutorial/Step9/tutorial.cxx
index b3c6a4f..7bfb60b 100644
--- a/Help/guide/tutorial/Step9/tutorial.cxx
+++ b/Help/guide/tutorial/Step9/tutorial.cxx
@@ -21,7 +21,7 @@ int main(int argc, char* argv[])
}
// convert input to double
- const double inputValue = std::stod(argv[1]);
+ const double inputValue = strtod(argv[1].c_str(), nullptr);
// which square root function should we use?
#ifdef USE_MYMATH
--
2.30.1