MCPcopy Create free account
hub / github.com/Illumina/hap.py / asBool

Method asBool

external/jsoncpp/jsoncpp.cpp:2275–2291  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2273}
2274
2275bool Value::asBool() const {
2276 switch (type_) {
2277 case booleanValue:
2278 return value_.bool_;
2279 case nullValue:
2280 return false;
2281 case intValue:
2282 return value_.int_ ? true : false;
2283 case uintValue:
2284 return value_.uint_ ? true : false;
2285 case realValue:
2286 return value_.real_ ? true : false;
2287 default:
2288 break;
2289 }
2290 JSON_FAIL_MESSAGE("Value is not convertible to bool.");
2291}
2292
2293bool Value::isConvertibleTo(ValueType other) const {
2294 switch (other) {

Callers 3

getInfoFlagMethod · 0.80
putMethod · 0.80
writeValueMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected