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

Method asBool

json/jsoncpp.cpp:3308–3325  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3306}
3307
3308bool Value::asBool() const {
3309 switch (type_) {
3310 case booleanValue:
3311 return value_.bool_;
3312 case nullValue:
3313 return false;
3314 case intValue:
3315 return value_.int_ ? true : false;
3316 case uintValue:
3317 return value_.uint_ ? true : false;
3318 case realValue:
3319 // This is kind of strange. Not recommended.
3320 return (value_.real_ != 0.0) ? true : false;
3321 default:
3322 break;
3323 }
3324 JSON_FAIL_MESSAGE("Value is not convertible to bool.");
3325}
3326
3327bool Value::isConvertibleTo(ValueType other) const {
3328 switch (other) {

Callers 3

newCharReaderMethod · 0.80
writeValueMethod · 0.80
newStreamWriterMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected