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

Function arg_value

tests/core/model_load_bench.cpp:14–21  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

12namespace {
13
14std::optional<std::string> arg_value(int argc, char ** argv, const std::string & name) {
15 for (int i = 1; i + 1 < argc; ++i) {
16 if (argv[i] == name) {
17 return std::string(argv[i + 1]);
18 }
19 }
20 return std::nullopt;
21}
22
23int arg_int(int argc, char ** argv, const std::string & name, int fallback) {
24 if (const auto value = arg_value(argc, argv, name)) {

Callers 2

arg_intFunction · 0.70
required_pathFunction · 0.70

Calls 1

stringFunction · 0.70

Tested by

no test coverage detected