Skip to content

Commit

Permalink
Fixed -Wsign-conversion warning
Browse files Browse the repository at this point in the history
  • Loading branch information
walbourn committed Jul 11, 2019
1 parent 4afff45 commit b4b41a5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Src/d3dx12.h
Original file line number Diff line number Diff line change
Expand Up @@ -1868,12 +1868,12 @@ inline void MemcpySubresource(
{
for (UINT z = 0; z < NumSlices; ++z)
{
BYTE* pDestSlice = reinterpret_cast<BYTE*>(pDest->pData) + pDest->SlicePitch * z;
const BYTE* pSrcSlice = reinterpret_cast<const BYTE*>(pSrc->pData) + pSrc->SlicePitch * z;
auto pDestSlice = reinterpret_cast<BYTE*>(pDest->pData) + pDest->SlicePitch * z;
auto pSrcSlice = reinterpret_cast<const BYTE*>(pSrc->pData) + pSrc->SlicePitch * LONG_PTR(z);
for (UINT y = 0; y < NumRows; ++y)
{
memcpy(pDestSlice + pDest->RowPitch * y,
pSrcSlice + pSrc->RowPitch * y,
pSrcSlice + pSrc->RowPitch * LONG_PTR(y),
RowSizeInBytes);
}
}
Expand Down

0 comments on commit b4b41a5

Please sign in to comment.