Return type must be int for GetNumberAsInt(). Fixes #258

This commit is contained in:
Syoyo Fujita 2020-05-11 19:07:00 +09:00
parent fe77cc5cdd
commit ff0a2e9fb4

View File

@ -323,7 +323,8 @@ class Value {
}
// Use this function if you want to have number value as int.
double GetNumberAsInt() const {
// TODO(syoyo): Support int value larger than 32 bits
int GetNumberAsInt() const {
if (type_ == REAL_TYPE) {
return int(real_value_);
} else {