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

Function arg_value

tests/seed_vc/seed_vc_warm_bench.cpp:18–25  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

16namespace {
17
18std::string arg_value(int argc, char ** argv, const std::string & name, const std::string & fallback) {
19 for (int i = 1; i + 1 < argc; ++i) {
20 if (argv[i] == name) {
21 return argv[i + 1];
22 }
23 }
24 return fallback;
25}
26
27int int_arg(int argc, char ** argv, const std::string & name, int fallback) {
28 return std::stoi(arg_value(argc, argv, name, std::to_string(fallback)));

Callers 3

int_argFunction · 0.70
mainFunction · 0.70
mainFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected