MCPcopy Create free account
hub / github.com/SOUI2/soui / isInt64

Method isInt64

third-part/jsoncpp/src/lib_json/json_value.cpp:1348–1366  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1346}
1347
1348bool Value::isInt64() const {
1349#if defined(JSON_HAS_INT64)
1350 switch (type_) {
1351 case intValue:
1352 return true;
1353 case uintValue:
1354 return value_.uint_ <= UInt64(maxInt64);
1355 case realValue:
1356 // Note that maxInt64 (= 2^63 - 1) is not exactly representable as a
1357 // double, so double(maxInt64) will be rounded up to 2^63. Therefore we
1358 // require the value to be strictly less than the limit.
1359 return value_.real_ >= double(minInt64) &&
1360 value_.real_ < double(maxInt64) && IsIntegral(value_.real_);
1361 default:
1362 break;
1363 }
1364#endif // JSON_HAS_INT64
1365 return false;
1366}
1367
1368bool Value::isUInt64() const {
1369#if defined(JSON_HAS_INT64)

Callers 1

checkIsMethod · 0.80

Calls 1

IsIntegralFunction · 0.85

Tested by

no test coverage detected