From cdeb3fe5086326cf60aad4bd162e9ce06d9b21b0 Mon Sep 17 00:00:00 2001 From: Chuck Walbourn Date: Thu, 12 Apr 2018 10:34:52 -0700 Subject: [PATCH] Minor code review feedback --- DirectXTex/d3dx12.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/DirectXTex/d3dx12.h b/DirectXTex/d3dx12.h index d6b7180..dd7a23c 100644 --- a/DirectXTex/d3dx12.h +++ b/DirectXTex/d3dx12.h @@ -1587,7 +1587,7 @@ struct CD3DX12_CPU_DESCRIPTOR_HANDLE : public D3D12_CPU_DESCRIPTOR_HANDLE } CD3DX12_CPU_DESCRIPTOR_HANDLE& Offset(INT offsetInDescriptors, UINT descriptorIncrementSize) { - ptr += UINT64(offsetInDescriptors) * UINT64(descriptorIncrementSize); + ptr += INT64(offsetInDescriptors) * UINT64(descriptorIncrementSize); return *this; } CD3DX12_CPU_DESCRIPTOR_HANDLE& Offset(INT offsetScaledByIncrementSize) @@ -1626,7 +1626,7 @@ struct CD3DX12_CPU_DESCRIPTOR_HANDLE : public D3D12_CPU_DESCRIPTOR_HANDLE static inline void InitOffsetted(_Out_ D3D12_CPU_DESCRIPTOR_HANDLE &handle, _In_ const D3D12_CPU_DESCRIPTOR_HANDLE &base, INT offsetInDescriptors, UINT descriptorIncrementSize) { - handle.ptr = base.ptr + UINT64(offsetInDescriptors) * UINT64(descriptorIncrementSize); + handle.ptr = base.ptr + INT64(offsetInDescriptors) * UINT64(descriptorIncrementSize); } }; @@ -1648,7 +1648,7 @@ struct CD3DX12_GPU_DESCRIPTOR_HANDLE : public D3D12_GPU_DESCRIPTOR_HANDLE } CD3DX12_GPU_DESCRIPTOR_HANDLE& Offset(INT offsetInDescriptors, UINT descriptorIncrementSize) { - ptr += UINT64(offsetInDescriptors) * UINT64(descriptorIncrementSize); + ptr += INT64(offsetInDescriptors) * UINT64(descriptorIncrementSize); return *this; } CD3DX12_GPU_DESCRIPTOR_HANDLE& Offset(INT offsetScaledByIncrementSize) @@ -1687,7 +1687,7 @@ struct CD3DX12_GPU_DESCRIPTOR_HANDLE : public D3D12_GPU_DESCRIPTOR_HANDLE static inline void InitOffsetted(_Out_ D3D12_GPU_DESCRIPTOR_HANDLE &handle, _In_ const D3D12_GPU_DESCRIPTOR_HANDLE &base, INT offsetInDescriptors, UINT descriptorIncrementSize) { - handle.ptr = base.ptr + UINT64(offsetInDescriptors) * UINT64(descriptorIncrementSize); + handle.ptr = base.ptr + INT64(offsetInDescriptors) * UINT64(descriptorIncrementSize); } };