MCPcopy Create free account
hub / github.com/RenderKit/embree / updateCommandLine

Method updateCommandLine

tutorials/common/tutorial/benchmark.cpp:152–171  ·  view source on GitHub ↗

remove the processed commdand line options

Source from the content-addressed store, hash-verified

150
151// remove the processed commdand line options
152void TutorialBenchmark::updateCommandLine(int& argc, char** argv)
153{
154 for (std::string const& str : processedCommandLineOptions)
155 {
156 for (int i = 0; i < argc; ++i) {
157 if (std::string(argv[i]) == str) {
158 int remove = 1;
159 int j = i+1;
160 while(j < argc && !startsWith(std::string(argv[j]), "-")) {
161 remove++;
162 j++;
163 }
164 argc -= remove;
165 for (j = i; j < argc; ++j) {
166 argv[j] = argv[j+remove];
167 }
168 }
169 }
170 }
171}
172
173void TutorialBenchmark::postParseCommandLine()
174{

Callers

nothing calls this directly

Calls 1

startsWithFunction · 0.70

Tested by

no test coverage detected