From: Kefu Chai Date: Sun, 27 Jun 2021 01:47:26 +0000 (+0800) Subject: common/options: s/boost::lexical_cast/std::stoull/ X-Git-Tag: v17.1.0~1533^2~5 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=3692c54944fdf2aaa0b4ae6a4d5c6bc024f4df37;p=ceph.git common/options: s/boost::lexical_cast/std::stoull/ we should use standard library for more well defined behavior, and less dependencies on 3rd party libraries. Signed-off-by: Kefu Chai --- diff --git a/src/common/options.cc b/src/common/options.cc index 8ad93c01a073..ac760e3491d6 100644 --- a/src/common/options.cc +++ b/src/common/options.cc @@ -210,8 +210,8 @@ int Option::parse_value( } } else if (type == Option::TYPE_MILLISECS) { try { - *out = std::chrono::milliseconds(boost::lexical_cast(val)); - } catch (const boost::bad_lexical_cast& e) { + *out = std::chrono::milliseconds(std::stoull(val)); + } catch (const std::logic_error& e) { *error_message = e.what(); return -EINVAL; }