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

Function parse_float_value

src/framework/runtime/options.cpp:25–32  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

23auto parse_number(const std::string & value, std::string_view key, std::string_view kind, Parse parse) {
24 size_t parsed = 0;
25 try {
26 const auto out = parse(value, &parsed);
27 if (parsed == value.size()) {
28 return out;
29 }
30 } catch (const std::invalid_argument &) {
31 } catch (const std::out_of_range &) {
32 throw InvalidRequestError(std::string(key) + " is out of range");
33 }
34 throw InvalidRequestError(std::string(key) + " must be " + std::string(kind));
35}

Callers 2

parse_float_optionFunction · 0.85

Calls 2

stringFunction · 0.50
sizeMethod · 0.45

Tested by

no test coverage detected