Cast to uintptr_t instead of size_t for mask ops on ptrs.
Addressing reviewer comment.
@@ -742,7 +742,7 @@ DwaCompressor::LossyDctDecoderBase::execute ()
for (int i = 0; i < _SSE_ALIGNMENT; ++i)
{
- if ((reinterpret_cast<size_t>(rowBlockHandle + i) & _SSE_ALIGNMENT_MASK) == 0)
+ if ((reinterpret_cast<uintptr_t>(rowBlockHandle + i) & _SSE_ALIGNMENT_MASK) == 0)
rowBlock[0] = (unsigned short *)(rowBlockHandle + i);
}
@@ -1010,7 +1010,7 @@ DwaCompressor::LossyDctDecoderBase::execute ()
for (int y = 8 * blocky; y < 8 * blocky + maxY; ++y)
{
- if (reinterpret_cast<size_t>(_rowPtrs[comp][y]) & _SSE_ALIGNMENT_MASK)
+ if (reinterpret_cast<uintptr_t>(_rowPtrs[comp][y]) & _SSE_ALIGNMENT_MASK)
fastPath = false;
}
