Skip to content
Snippets Groups Projects
Commit 79318842 authored by Simon Praetorius's avatar Simon Praetorius
Browse files

Small cleanup of strtonumber implementation

parent 36a09eff
No related branches found
No related tags found
1 merge request!564WIP: A generic string-to-number conversion function
......@@ -236,7 +236,7 @@ namespace Dune
/// Overload of \ref strTo for `std::string` arguments.
template<typename T>
T strTo (std::string const& str) { return strTo<T>(str.c_str()); }
T strTo (const std::string& str) { return strTo<T>(str.c_str()); }
} // end namespace Dune
......
......@@ -142,7 +142,7 @@ int main()
Comparator<T> cmp{};
Generator<T> generate{};
for (int i = 0; i < 100; ++i) { // repeat the test 10 times
for (int i = 0; i < 100; ++i) { // repeat the test 100 times
value = generate();
std::ostringstream oss;
oss << std::setprecision(std::numeric_limits<T>::digits10 + 3) << value;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment