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

Function extractIntOption

fdbclient/MultiVersionTransaction.actor.cpp:1481–1493  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1479}
1480
1481int64_t extractIntOption(Optional<StringRef> value, int64_t minValue, int64_t maxValue) {
1482 validateOptionValuePresent(value);
1483 if (value.get().size() != 8) {
1484 throw invalid_option_value();
1485 }
1486
1487 int64_t passed = *((int64_t*)(value.get().begin()));
1488 if (passed > maxValue || passed < minValue) {
1489 throw invalid_option_value();
1490 }
1491
1492 return passed;
1493}
1494
1495} // namespace
1496

Callers 2

setTimeoutMethod · 0.70

Calls 4

getMethod · 0.65
sizeMethod · 0.45
beginMethod · 0.45

Tested by

no test coverage detected