From dfb852cbb01266b7d22beb3563a4487bf98d3271 Mon Sep 17 00:00:00 2001 From: Capostrophic Date: Mon, 3 Jun 2019 12:15:01 +0300 Subject: [PATCH] Improve Boost apologia --- components/fallback/fallback.cpp | 4 ++-- components/settings/settings.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/components/fallback/fallback.cpp b/components/fallback/fallback.cpp index e2060935e..d5c6c4e97 100644 --- a/components/fallback/fallback.cpp +++ b/components/fallback/fallback.cpp @@ -30,8 +30,8 @@ namespace Fallback { try { - // We have to rely on Boost because std::stof from C++11 - // uses the current locale for separators which we don't want and often silently ignores parsing errors. + // We have to rely on Boost because std::stof from C++11 uses the current locale + // for separators (which is undesired) and it often silently ignores parsing errors. return boost::lexical_cast(fallback); } catch (boost::bad_lexical_cast&) diff --git a/components/settings/settings.cpp b/components/settings/settings.cpp index b3701f764..42f65fc55 100644 --- a/components/settings/settings.cpp +++ b/components/settings/settings.cpp @@ -355,8 +355,8 @@ float Manager::getFloat (const std::string& setting, const std::string& category const std::string value = getString(setting, category); try { - // We have to rely on Boost because std::stof from C++11 - // uses the current locale for separators which we don't want and often silently ignores parsing errors. + // We have to rely on Boost because std::stof from C++11 uses the current locale + // for separators (which is undesired) and it often silently ignores parsing errors. return boost::lexical_cast(value); } catch (boost::bad_lexical_cast&)