when parsing a number from an int, also set the 'real value' to the value

This commit is contained in:
Benjamin Schmithüsen 2019-08-19 16:16:43 +02:00
parent 2f044e77f1
commit c7e205be87

View File

@ -242,7 +242,7 @@ class Value {
boolean_value_(false) {} boolean_value_(false) {}
explicit Value(bool b) : type_(BOOL_TYPE) { boolean_value_ = b; } 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(double n) : type_(REAL_TYPE) { real_value_ = n; }
explicit Value(const std::string &s) : type_(STRING_TYPE) { explicit Value(const std::string &s) : type_(STRING_TYPE) {
string_value_ = s; string_value_ = s;