MCPcopy Create free account
hub / github.com/Samsung/UTopia / isIntegral

Method isIntegral

external/jsoncpp/jsoncpp.cpp:3772–3792  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3770}
3771
3772bool Value::isIntegral() const {
3773 switch (type()) {
3774 case intValue:
3775 case uintValue:
3776 return true;
3777 case realValue:
3778#if defined(JSON_HAS_INT64)
3779 // Note that maxUInt64 (= 2^64 - 1) is not exactly representable as a
3780 // double, so double(maxUInt64) will be rounded up to 2^64. Therefore we
3781 // require the value to be strictly less than the limit.
3782 return value_.real_ >= double(minInt64) &&
3783 value_.real_ < maxUInt64AsDouble && IsIntegral(value_.real_);
3784#else
3785 return value_.real_ >= minInt && value_.real_ <= maxUInt &&
3786 IsIntegral(value_.real_);
3787#endif // JSON_HAS_INT64
3788 default:
3789 break;
3790 }
3791 return false;
3792}
3793
3794bool Value::isDouble() const {
3795 return type() == intValue || type() == uintValue || type() == realValue;

Callers

nothing calls this directly

Calls 1

IsIntegralFunction · 0.85

Tested by

no test coverage detected