MCPcopy Create free account
hub / github.com/OpenDDS/OpenDDS / check_for_unknown_options

Function check_for_unknown_options

tools/inspect/Inspect.cpp:85–97  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

83}
84
85void check_for_unknown_options(Args& args)
86{
87 for (ArgsIt args_it = args.begin(); args_it != args.end(); ++args_it) {
88 if (*args_it == "--") {
89 // Remaining arguments should be interpreted as positional arguments
90 return;
91 }
92 if (args_it->length() && args_it->at(0) == '-') {
93 std::cerr << "ERROR: Option " << *args_it << " is invalid" << std::endl;
94 throw 1;
95 }
96 }
97}
98
99template <typename IntType>
100IntType get_pos_argument_int(Args& args, size_t pos, const std::string& what)

Callers 1

parse_argsFunction · 0.85

Calls 3

beginMethod · 0.45
endMethod · 0.45
lengthMethod · 0.45

Tested by

no test coverage detected