Merge pull request #195 from ux3d/fix/parse-int-as-double

(also) parse int as double
This commit is contained in:
Syoyo Fujita 2019-08-20 19:33:20 +09:00 committed by GitHub
commit 1f160d5b8f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -242,7 +242,7 @@ class Value {
boolean_value_(false) {}
explicit Value(bool b) : type_(BOOL_TYPE) { boolean_value_ = b; }
explicit Value(int i) : type_(INT_TYPE) { int_value_ = i; }
explicit Value(int i) : type_(INT_TYPE) { int_value_ = i; real_value_ = i; }
explicit Value(double n) : type_(REAL_TYPE) { real_value_ = n; }
explicit Value(const std::string &s) : type_(STRING_TYPE) {
string_value_ = s;