From 386d5c3e2c84bf546b7109aea4538f2d89efc8a7 Mon Sep 17 00:00:00 2001 From: Christoph Schwarzmeier <christoph.schwarzmeier@fau.de> Date: Wed, 16 Jun 2021 10:12:57 +0000 Subject: [PATCH] Change reference to const reference in stringToNum --- src/core/stringToNum.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/core/stringToNum.h b/src/core/stringToNum.h index 00723d913..d031b53d3 100644 --- a/src/core/stringToNum.h +++ b/src/core/stringToNum.h @@ -25,15 +25,15 @@ namespace walberla { template<typename S> -inline S stringToNum( std::string & t ); -template <> inline float stringToNum( std::string & t ) { return std::stof(t); } -template <> inline double stringToNum( std::string & t ) { return std::stod(t); } -template <> inline long double stringToNum( std::string & t ) { return std::stold(t); } -template <> inline int stringToNum( std::string & t ) { return std::stoi(t); } -template <> inline long stringToNum( std::string & t ) { return std::stol(t); } -template <> inline long long stringToNum( std::string & t ) { return std::stoll(t); } -template <> inline unsigned long stringToNum( std::string & t ) { return std::stoul(t); } -template <> inline unsigned long long stringToNum( std::string & t ) { return std::stoull(t); } +inline S stringToNum( const std::string & t ); +template <> inline float stringToNum( const std::string & t ) { return std::stof(t); } +template <> inline double stringToNum( const std::string & t ) { return std::stod(t); } +template <> inline long double stringToNum( const std::string & t ) { return std::stold(t); } +template <> inline int stringToNum( const std::string & t ) { return std::stoi(t); } +template <> inline long stringToNum( const std::string & t ) { return std::stol(t); } +template <> inline long long stringToNum( const std::string & t ) { return std::stoll(t); } +template <> inline unsigned long stringToNum( const std::string & t ) { return std::stoul(t); } +template <> inline unsigned long long stringToNum( const std::string & t ) { return std::stoull(t); } } // namespace walberla -- GitLab