mirror of
https://github.com/ChaiScript/ChaiScript.git
synced 2025-12-06 16:57:04 +08:00
Fix some warnings found on g++7
This commit is contained in:
parent
6c41ac90d8
commit
9be8f36824
@ -205,15 +205,15 @@ namespace chaiscript {
|
||||
case '9':
|
||||
if (decimal_place < 10) {
|
||||
t *= 10;
|
||||
t += c - '0';
|
||||
t += static_cast<T>(c - '0');
|
||||
}
|
||||
else {
|
||||
t += (c - '0') / decimal_place;
|
||||
t += static_cast<T>(c - '0') / decimal_place;
|
||||
decimal_place *= 10;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
return exponent ? base * std::pow(T(10), t * exponent) : t;
|
||||
return exponent ? base * std::pow(T(10), t * static_cast<T>(exponent)) : t;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user