Improve Boost apologia

pull/2404/head
Capostrophic 6 years ago
parent 9502e9f3f7
commit dfb852cbb0

@ -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<float>(fallback);
}
catch (boost::bad_lexical_cast&)

@ -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<float>(value);
}
catch (boost::bad_lexical_cast&)

Loading…
Cancel
Save