-Werror=old-style-cast

use of old-style cast to ‘T’ [-Werror=old-style-cast]
  131 | rhs = (T)num;
This commit is contained in:
Sam4uk 2022-02-06 16:29:54 +02:00 committed by GitHub
parent cdf89fa352
commit e20be84471
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -128,7 +128,7 @@ ConvertStreamTo(std::stringstream& stream, T& rhs) {
if ((stream >> std::noskipws >> num) && (stream >> std::ws).eof()) {
if (num >= (std::numeric_limits<T>::min)() &&
num <= (std::numeric_limits<T>::max)()) {
rhs = (T)num;
rhs = static_cast<T>(num);
return true;
}
}