From 79e898607db2bcc983992356e6add0d1b79ebcc4 Mon Sep 17 00:00:00 2001 From: Chuck Walbourn Date: Sat, 19 Nov 2022 13:49:10 -0800 Subject: [PATCH] Fix -Wold-style-cast warning --- DirectXTex/d3dx12.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DirectXTex/d3dx12.h b/DirectXTex/d3dx12.h index 00bf676..565b412 100644 --- a/DirectXTex/d3dx12.h +++ b/DirectXTex/d3dx12.h @@ -528,7 +528,7 @@ struct CD3DX12_RASTERIZER_DESC1 : public D3D12_RASTERIZER_DESC1 FillMode = o.FillMode; CullMode = o.CullMode; FrontCounterClockwise = o.FrontCounterClockwise; - DepthBias = (FLOAT)o.DepthBias; + DepthBias = static_cast(o.DepthBias); DepthBiasClamp = o.DepthBiasClamp; SlopeScaledDepthBias = o.SlopeScaledDepthBias; DepthClipEnable = o.DepthClipEnable; @@ -585,7 +585,7 @@ struct CD3DX12_RASTERIZER_DESC1 : public D3D12_RASTERIZER_DESC1 o.FillMode = FillMode; o.CullMode = CullMode; o.FrontCounterClockwise = FrontCounterClockwise; - o.DepthBias = (INT)DepthBias; + o.DepthBias = static_cast(DepthBias); o.DepthBiasClamp = DepthBiasClamp; o.SlopeScaledDepthBias = SlopeScaledDepthBias; o.DepthClipEnable = DepthClipEnable;