static_cast
Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
parent
a87c59be51
commit
db0da461ee
@ -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())
|
||||
|
||||
Loading…
Reference in New Issue
Block a user