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

Method get_parameter

src/core/command_line.cpp:57–71  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

55}
56
57const char *CommandLine::get_parameter(int i, const char *longopt, char shortopt)
58{
59 const int opt_in = find_option(_argc, _argv, longopt, shortopt);
60 const int arg_in = opt_in + 1 + i;
61
62 if (arg_in >= _argc)
63 return NULL;
64
65 for (int j = opt_in; j < arg_in; ++j) {
66 if (is_end_options_marker(_argv[j + 1]))
67 return NULL;
68 }
69
70 return _argv[arg_in];
71}
72
73bool CommandLine::has_option(const char *longopt, char shortopt)
74{

Callers 2

test_command_lineFunction · 0.80
parseMethod · 0.80

Calls 2

find_optionFunction · 0.85
is_end_options_markerFunction · 0.85

Tested by 1

test_command_lineFunction · 0.64