MCPcopy Create free account
hub / github.com/deathkiller/jazz2-native / isUInt64

Method isUInt64

Sources/Dependencies/jsoncpp/value.cpp:1509–1526  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1507 }
1508
1509 bool Value::isUInt64() const {
1510#if defined(JSON_HAS_INT64)
1511 switch (type()) {
1512 case intValue:
1513 return value_.int_ >= 0;
1514 case uintValue:
1515 return true;
1516 case realValue:
1517 // Note that maxUInt64 (= 2^64 - 1) is not exactly representable as a
1518 // double, so double(maxUInt64) will be rounded up to 2^64. Therefore we
1519 // require the value to be strictly less than the limit.
1520 return value_.real_ >= 0 && value_.real_ < maxUInt64AsDouble && IsIntegral(value_.real_);
1521 default:
1522 break;
1523 }
1524#endif // JSON_HAS_INT64
1525 return false;
1526 }
1527
1528 bool Value::isIntegral() const {
1529 switch (type()) {

Callers

nothing calls this directly

Calls 2

typeClass · 0.85
IsIntegralFunction · 0.85

Tested by

no test coverage detected