File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1279,7 +1279,11 @@ bool Value::isBool() const { return type_ == booleanValue; }
12791279bool Value::isInt () const {
12801280 switch (type_) {
12811281 case intValue:
1282+ #if defined(JSON_HAS_INT64)
12821283 return value_.int_ >= minInt && value_.int_ <= maxInt;
1284+ #else
1285+ return true ;
1286+ #endif
12831287 case uintValue:
12841288 return value_.uint_ <= UInt (maxInt);
12851289 case realValue:
@@ -1294,9 +1298,17 @@ bool Value::isInt() const {
12941298bool Value::isUInt () const {
12951299 switch (type_) {
12961300 case intValue:
1301+ #if defined(JSON_HAS_INT64)
12971302 return value_.int_ >= 0 && LargestUInt (value_.int_ ) <= LargestUInt (maxUInt);
1303+ #else
1304+ return value_.int_ >= 0 ;
1305+ #endif
12981306 case uintValue:
1307+ #if defined(JSON_HAS_INT64)
12991308 return value_.uint_ <= maxUInt;
1309+ #else
1310+ return true ;
1311+ #endif
13001312 case realValue:
13011313 return value_.real_ >= 0 && value_.real_ <= maxUInt &&
13021314 IsIntegral (value_.real_ );
@@ -1354,9 +1366,9 @@ bool Value::isIntegral() const {
13541366#endif
13551367}
13561368
1357- bool Value::isDouble () const { return type_ == realValue || isIntegral () ; }
1369+ bool Value::isDouble () const { return type_ == intValue || type_ == uintValue || type_ == realValue ; }
13581370
1359- bool Value::isNumeric () const { return isIntegral () || isDouble (); }
1371+ bool Value::isNumeric () const { return isDouble (); }
13601372
13611373bool Value::isString () const { return type_ == stringValue; }
13621374
You can’t perform that action at this time.
0 commit comments