| 1479 | } |
| 1480 | |
| 1481 | int64_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 |
no test coverage detected