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

Method asInt64

json/jsoncpp.cpp:3204–3223  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3202#if defined(JSON_HAS_INT64)
3203
3204Value::Int64 Value::asInt64() const {
3205 switch (type_) {
3206 case intValue:
3207 return Int64(value_.int_);
3208 case uintValue:
3209 JSON_ASSERT_MESSAGE(isInt64(), "LargestUInt out of Int64 range");
3210 return Int64(value_.uint_);
3211 case realValue:
3212 JSON_ASSERT_MESSAGE(InRange(value_.real_, minInt64, maxInt64),
3213 "double out of Int64 range");
3214 return Int64(value_.real_);
3215 case nullValue:
3216 return 0;
3217 case booleanValue:
3218 return value_.bool_ ? 1 : 0;
3219 default:
3220 break;
3221 }
3222 JSON_FAIL_MESSAGE("Value is not convertible to Int64.");
3223}
3224
3225Value::UInt64 Value::asUInt64() const {
3226 switch (type_) {

Callers 8

RecognizeMethod · 0.80
RecognizeMethod · 0.80
RecognizeMethod · 0.80
RecognizeMethod · 0.80
RecognizeMethod · 0.80
RecognizeMethod · 0.80
RecognizeMethod · 0.80
RecognizeMethod · 0.80

Calls 1

InRangeFunction · 0.85

Tested by

no test coverage detected