MCPcopy Create free account
hub / github.com/Kitware/VTK / isUInt

Method isUInt

ThirdParty/jsoncpp/vtkjsoncpp/jsoncpp.cpp:3718–3739  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3716}
3717
3718bool Value::isUInt() const {
3719 switch (type()) {
3720 case intValue:
3721#if defined(JSON_HAS_INT64)
3722 return value_.int_ >= 0 && LargestUInt(value_.int_) <= LargestUInt(maxUInt);
3723#else
3724 return value_.int_ >= 0;
3725#endif
3726 case uintValue:
3727#if defined(JSON_HAS_INT64)
3728 return value_.uint_ <= maxUInt;
3729#else
3730 return true;
3731#endif
3732 case realValue:
3733 return value_.real_ >= 0 && value_.real_ <= maxUInt &&
3734 IsIntegral(value_.real_);
3735 default:
3736 break;
3737 }
3738 return false;
3739}
3740
3741bool Value::isInt64() const {
3742#if defined(JSON_HAS_INT64)

Callers 2

GetUIntValueFunction · 0.80
GetUIntArrayFunction · 0.80

Calls 2

IsIntegralFunction · 0.70
typeEnum · 0.50

Tested by

no test coverage detected