diff --git a/DirectXTex/BC6HBC7.cpp b/DirectXTex/BC6HBC7.cpp index 37ff900..f87dc63 100644 --- a/DirectXTex/BC6HBC7.cpp +++ b/DirectXTex/BC6HBC7.cpp @@ -1195,7 +1195,11 @@ namespace // Find Min and Max points, as starting point HDRColorA X, Y; +#if (__cplusplus >= 201703L) + if constexpr (ishdr) +#else if (ishdr) +#endif { X = HDRColorA{ FLT_MAX, FLT_MAX, FLT_MAX, 0.0f }; Y = HDRColorA{ -FLT_MAX, -FLT_MAX, -FLT_MAX, 0.0f }; diff --git a/DirectXTex/DirectXTexConvert.cpp b/DirectXTex/DirectXTexConvert.cpp index e75b8c4..3660177 100644 --- a/DirectXTex/DirectXTexConvert.cpp +++ b/DirectXTex/DirectXTexConvert.cpp @@ -3263,10 +3263,11 @@ void DirectX::Internal::ConvertScanline( break; } -#ifdef _MSC_VER +#if (__cplusplus >= 201703L) + [[fallthrough]]; +#elif defined(_MSC_VER) __fallthrough; -#endif -#ifdef __clang__ +#elif defined(__clang__) [[clang::fallthrough]]; #endif @@ -3552,10 +3553,11 @@ void DirectX::Internal::ConvertScanline( break; } -#ifdef _MSC_VER +#if (__cplusplus >= 201703L) + [[fallthrough]]; +#elif defined(_MSC_VER) __fallthrough; -#endif -#ifdef __clang__ +#elif defined(__clang__) [[clang::fallthrough]]; #endif @@ -3650,10 +3652,11 @@ void DirectX::Internal::ConvertScanline( break; } -#ifdef _MSC_VER +#if (__cplusplus >= 201703L) + [[fallthrough]]; +#elif defined(_MSC_VER) __fallthrough; -#endif -#ifdef __clang__ +#elif defined(__clang__) [[clang::fallthrough]]; #endif