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

Method isUInt64

external/jsoncpp/jsoncpp.cpp:3752–3770  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3750}
3751
3752bool Value::isUInt64() const {
3753#if defined(JSON_HAS_INT64)
3754 switch (type()) {
3755 case intValue:
3756 return value_.int_ >= 0;
3757 case uintValue:
3758 return true;
3759 case realValue:
3760 // Note that maxUInt64 (= 2^64 - 1) is not exactly representable as a
3761 // double, so double(maxUInt64) will be rounded up to 2^64. Therefore we
3762 // require the value to be strictly less than the limit.
3763 return value_.real_ >= 0 && value_.real_ < maxUInt64AsDouble &&
3764 IsIntegral(value_.real_);
3765 default:
3766 break;
3767 }
3768#endif // JSON_HAS_INT64
3769 return false;
3770}
3771
3772bool Value::isIntegral() const {
3773 switch (type()) {

Callers 1

fromJsonMethod · 0.80

Calls 1

IsIntegralFunction · 0.85

Tested by

no test coverage detected