MCPcopy Create free account
hub / github.com/GPUOpen-Effects/GeometryFX / GetCmdParam

Method GetCmdParam

framework/d3d11/amd_sdk/src/HelperFunctions.cpp:427–451  ·  view source on GitHub ↗

-------------------------------------------------------------------------------------- Helper function for command line retrieval. Updates strCmdLine and strFlag Example: if strCmdLine=="-width:1024 -forceref" then after: strCmdLine==" -forceref" and strFlag=="1024" --------------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

425// then after: strCmdLine==" -forceref" and strFlag=="1024"
426//--------------------------------------------------------------------------------------
427bool AMD::GetCmdParam( WCHAR*& strCmdLine, WCHAR* strFlag )
428{
429 if (*strCmdLine == L':' || *strCmdLine == L'=')
430 {
431 strCmdLine++; // Skip ':'
432
433 // Place NULL terminator in strFlag after current token
434 wcscpy_s( strFlag, 256, strCmdLine );
435 WCHAR* strSpace = strFlag;
436 while (*strSpace && (*strSpace > L' '))
437 {
438 strSpace++;
439 }
440 *strSpace = 0;
441
442 // Update strCmdLine
443 strCmdLine += wcslen( strFlag );
444 return true;
445 }
446 else
447 {
448 strFlag[0] = 0;
449 return false;
450 }
451}
452
453
454//--------------------------------------------------------------------------------------

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected