MCPcopy Create free account
hub / github.com/0xShug0/audio.cpp / parse_i64_option

Function parse_i64_option

src/framework/runtime/options.cpp:169–176  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

167 std::initializer_list<std::string_view> keys) {
168 const auto match = find_option_match(options, keys);
169 return match.has_value() ? std::optional<std::string>(match->value) : std::nullopt;
170}
171
172bool parse_bool_option(const std::string & value, std::string_view key) {
173 if (value == "true" || value == "1" || value == "yes" || value == "on") {
174 return true;
175 }
176 if (value == "false" || value == "0" || value == "no" || value == "off") {
177 return false;
178 }
179 throw std::runtime_error(std::string(key) + " must be true/false, yes/no, on/off, or 1/0");

Calls 2

find_option_matchFunction · 0.85
parse_i64_valueFunction · 0.85

Tested by

no test coverage detected