MCPcopy Create free account
hub / github.com/crownengine/crown / find_option

Function find_option

src/core/command_line.cpp:38–49  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

36}
37
38static int find_option(int argc, const char **argv, const char *longopt, char shortopt)
39{
40 for (int i = 0; i < argc; ++i) {
41 if (is_end_options_marker(argv[i]))
42 break;
43
44 if (is_longopt(argv[i], longopt) || is_shortopt(argv[i], shortopt))
45 return i;
46 }
47
48 return argc;
49}
50
51CommandLine::CommandLine(int argc, const char **argv)
52 : _argc(argc)

Callers 2

get_parameterMethod · 0.85
has_optionMethod · 0.85

Calls 3

is_end_options_markerFunction · 0.85
is_longoptFunction · 0.85
is_shortoptFunction · 0.85

Tested by

no test coverage detected