From 3692c54944fdf2aaa0b4ae6a4d5c6bc024f4df37 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Sun, 27 Jun 2021 09:47:26 +0800 Subject: [PATCH] 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 --- src/common/options.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/options.cc b/src/common/options.cc index 8ad93c01a07..ac760e3491d 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; } -- 2.39.5