Skip to content

Instantly share code, notes, and snippets.

Created January 2, 2013 01:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save anonymous/4431386 to your computer and use it in GitHub Desktop.
Save anonymous/4431386 to your computer and use it in GitHub Desktop.
Stealth macro nesting
if (FAILED(D3D11CreateDevice(
NULL,
D3D_DRIVER_TYPE_HARDWARE,
NULL,
#if _DEBUG
D3D11_CREATE_DEVICE_DEBUG,
#else
0,
#endif
NULL,
0,
D3D11_SDK_VERSION,
g_pDevice.address(),
&featureLevel,
g_pContext.address())))
{
fprintf(stderr, "Could not create D3D11 device!\n");
return false;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment