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

Function parse_i64_value

src/framework/runtime/options.cpp:64–71  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

62}
63
64int64_t parse_i64_value(const std::string & value, std::string_view key) {
65 size_t parsed = 0;
66 const int64_t out = std::stoll(value, &parsed);
67 if (parsed != value.size()) {
68 throw std::runtime_error(std::string(key) + " must be an integer");
69 }
70 return out;
71}
72
73size_t checked_mib_to_bytes(int64_t mb, std::string_view key) {
74 constexpr int64_t kMiB = 1024 * 1024;

Callers 3

parse_i64_optionFunction · 0.85
parse_size_mb_optionFunction · 0.85

Calls 2

stringFunction · 0.50
sizeMethod · 0.45

Tested by

no test coverage detected