| 2010 | } |
| 2011 | |
| 2012 | int64_t extractIntOption(Optional<StringRef> value, int64_t minValue, int64_t maxValue) { |
| 2013 | validateOptionValuePresent(value); |
| 2014 | if (value.get().size() != 8) { |
| 2015 | throw invalid_option_value(); |
| 2016 | } |
| 2017 | |
| 2018 | int64_t passed = *((int64_t*)(value.get().begin())); |
| 2019 | if (passed > maxValue || passed < minValue) { |
| 2020 | throw invalid_option_value(); |
| 2021 | } |
| 2022 | |
| 2023 | return passed; |
| 2024 | } |
| 2025 | |
| 2026 | uint64_t extractHexOption(StringRef value) { |
| 2027 | char* end; |
no test coverage detected