MCPcopy Create free account
hub / github.com/apple/foundationdb / getBool

Method getBool

bindings/flow/Tuple.cpp:390–403  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

388}
389
390bool Tuple::getBool(size_t index) const {
391 if (index >= offsets.size()) {
392 throw invalid_tuple_index();
393 }
394 ASSERT_LT(offsets[index], data.size());
395 uint8_t code = data[offsets[index]];
396 if (code == FALSE_CODE) {
397 return false;
398 } else if (code == TRUE_CODE) {
399 return true;
400 } else {
401 throw invalid_tuple_data_type();
402 }
403}
404
405float Tuple::getFloat(size_t index) const {
406 if (index >= offsets.size()) {

Callers 3

tupleToStringFunction · 0.45
callMethod · 0.45
callMethod · 0.45

Calls 1

sizeMethod · 0.45

Tested by 3

tupleToStringFunction · 0.36
callMethod · 0.36
callMethod · 0.36