diff --git a/src/vkcv/Context.cpp b/src/vkcv/Context.cpp index 9682ca1894c8993068cff518d3a5a0ffdec75237..ddb7d7626775cf486fe69a8dc35afe1d98c12ff3 100644 --- a/src/vkcv/Context.cpp +++ b/src/vkcv/Context.cpp @@ -28,7 +28,7 @@ namespace vkcv { } // if in debug mode, check if validation layers are supported. Enable them if supported -#if _DEBUG +#ifndef NDEBUG std::vector<const char*> validationLayers = { "VK_LAYER_KHRONOS_validation" }; @@ -73,7 +73,7 @@ namespace vkcv { instanceExtensions.data() ); -#if _DEBUG +#ifndef NDEBUG instanceCreateInfo.enabledLayerCount = static_cast<uint32_t>(validationLayers.size()); instanceCreateInfo.ppEnabledLayerNames = validationLayers.data(); #endif @@ -111,7 +111,7 @@ namespace vkcv { nullptr // Should our device use some features??? If yes: TODO ); -#if _DEBUG +#ifndef NDEBUG deviceCreateInfo.enabledLayerCount = static_cast<uint32_t>(validationLayers.size()); deviceCreateInfo.ppEnabledLayerNames = validationLayers.data(); #endif @@ -273,7 +273,7 @@ namespace vkcv { const char** glfwExtensions = glfwGetRequiredInstanceExtensions(&glfwExtensionCount); std::vector<const char*> extensions(glfwExtensions, glfwExtensions + glfwExtensionCount); -#if _DEBUG +#ifndef NDEBUG extensions.push_back(VK_EXT_DEBUG_UTILS_EXTENSION_NAME); #endif