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

Function arg_value

tests/vibevoice/vibevoice_warm_bench.cpp:28–35  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

26namespace {
27
28std::string arg_value(int argc, char ** argv, const std::string & name, const std::string & fallback) {
29 for (int i = 1; i + 1 < argc; ++i) {
30 if (argv[i] == name) {
31 return argv[i + 1];
32 }
33 }
34 return fallback;
35}
36
37int int_arg(int argc, char ** argv, const std::string & name, int fallback) {
38 return std::stoi(arg_value(argc, argv, name, std::to_string(fallback)));

Callers 2

int_argFunction · 0.70
mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected