MCPcopy Create free account
hub / github.com/Vector35/binaryninja-api / asUInt64

Method asUInt64

json/jsoncpp.cpp:3225–3244  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3223}
3224
3225Value::UInt64 Value::asUInt64() const {
3226 switch (type_) {
3227 case intValue:
3228 JSON_ASSERT_MESSAGE(isUInt64(), "LargestInt out of UInt64 range");
3229 return UInt64(value_.int_);
3230 case uintValue:
3231 return UInt64(value_.uint_);
3232 case realValue:
3233 JSON_ASSERT_MESSAGE(InRange(value_.real_, 0, maxUInt64),
3234 "double out of UInt64 range");
3235 return UInt64(value_.real_);
3236 case nullValue:
3237 return 0;
3238 case booleanValue:
3239 return value_.bool_ ? 1 : 0;
3240 default:
3241 break;
3242 }
3243 JSON_FAIL_MESSAGE("Value is not convertible to UInt64.");
3244}
3245#endif // if defined(JSON_HAS_INT64)
3246
3247LargestInt Value::asLargestInt() const {

Callers

nothing calls this directly

Calls 1

InRangeFunction · 0.85

Tested by

no test coverage detected