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

Function parse_bool_option

src/framework/runtime/options.cpp:110–118  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

108}
109
110bool parse_bool_option(const std::string & value, std::string_view key) {
111 if (value == "true" || value == "1" || value == "yes" || value == "on") {
112 return true;
113 }
114 if (value == "false" || value == "0" || value == "no" || value == "off") {
115 return false;
116 }
117 throw std::runtime_error(std::string(key) + " must be true/false, yes/no, on/off, or 1/0");
118}
119
120std::optional<int> parse_int_option(
121 const std::unordered_map<std::string, std::string> & options,

Callers 15

mem_saver_from_optionsFunction · 0.85
reject_enabled_denoiseFunction · 0.85
parse_v2_configFunction · 0.85
parse_v1_configFunction · 0.85
ace_step_parse_requestFunction · 0.85
mem_saver_from_optionsFunction · 0.85
mem_saver_from_optionsFunction · 0.85

Calls 1

stringFunction · 0.50

Tested by

no test coverage detected