static_cast

Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
Rosen Penev 2023-01-05 16:20:47 -08:00
parent a87c59be51
commit db0da461ee

View File

@ -488,7 +488,7 @@ template <typename T>
T stringTo(const std::string& s, bool& ok) {
std::istringstream is(s);
T tmp = T();
ok = bool(is >> tmp);
ok = static_cast<bool>(is >> tmp);
std::string rest;
is >> std::skipws >> rest;
if (!rest.empty())