Fix some warnings found on g++7

This commit is contained in:
Jason Turner 2018-02-02 20:36:29 -07:00
parent 6c41ac90d8
commit 9be8f36824

View File

@ -205,15 +205,15 @@ namespace chaiscript {
case '9': case '9':
if (decimal_place < 10) { if (decimal_place < 10) {
t *= 10; t *= 10;
t += c - '0'; t += static_cast<T>(c - '0');
} }
else { else {
t += (c - '0') / decimal_place; t += static_cast<T>(c - '0') / decimal_place;
decimal_place *= 10; decimal_place *= 10;
} }
break; break;
default: default:
return exponent ? base * std::pow(T(10), t * exponent) : t; return exponent ? base * std::pow(T(10), t * static_cast<T>(exponent)) : t;
} }
} }
} }