MCPcopy Create free account
hub / github.com/KhronosGroup/KTX-Software / processArgs

Method processArgs

tests/loadtests/vkloadtests/TextureCubemap.cpp:205–228  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

203//===================================================================
204
205void
206TextureCubemap::processArgs(std::string sArgs)
207{
208 // Options descriptor
209 struct argparser::option longopts[] = {
210 {"external", argparser::option::no_argument, &externalFile, 1},
211 {"preload", argparser::option::no_argument, &preloadImages, 1},
212 {NULL, argparser::option::no_argument, NULL, 0}
213 };
214
215 argvector argv(sArgs);
216 argparser ap(argv);
217
218 int ch;
219 while ((ch = ap.getopt(nullptr, longopts, nullptr)) != -1) {
220 switch (ch) {
221 case 0: break;
222 default: assert(false); // Error in args in sample table.
223 }
224 }
225 assert(ap.optind < argv.size());
226 ktxfilename = argv[ap.optind];
227
228}
229
230/* ------------------------------------------------------------------------- */
231

Callers

nothing calls this directly

Calls 3

assertFunction · 0.85
getoptMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected