mirror of
https://github.com/microsoft/DirectXTex
synced 2024-11-21 12:00:06 +00:00
A few more uses of const
This commit is contained in:
parent
49c4299f74
commit
3eed3ae913
@ -1944,7 +1944,7 @@ HRESULT DirectX::LoadFromDDSFile(
|
||||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
auto pixelBytes = static_cast<DWORD>(image.GetPixelsSize());
|
||||
auto const pixelBytes = static_cast<DWORD>(image.GetPixelsSize());
|
||||
if (!ReadFile(hFile.get(), image.GetPixels(), pixelBytes, &bytesRead, nullptr))
|
||||
{
|
||||
image.Release();
|
||||
|
@ -264,13 +264,13 @@ namespace
|
||||
XMVECTOR r1 = XMVectorSplatW(*pRow1);
|
||||
|
||||
XMVECTOR v1 = XMVectorSaturate(XMVectorMultiply(r0, scale));
|
||||
XMVECTOR v2 = XMVectorSaturate(XMVectorMultiply(r1, scale));
|
||||
const XMVECTOR v2 = XMVectorSaturate(XMVectorMultiply(r1, scale));
|
||||
|
||||
r0 = XMVectorSplatW(*(++pRow0));
|
||||
r1 = XMVectorSplatW(*(++pRow1));
|
||||
|
||||
XMVECTOR v3 = XMVectorSaturate(XMVectorMultiply(XMVectorSplatW(r0), scale));
|
||||
XMVECTOR v4 = XMVectorSaturate(XMVectorMultiply(XMVectorSplatW(r1), scale));
|
||||
const XMVECTOR v4 = XMVectorSaturate(XMVectorMultiply(XMVectorSplatW(r1), scale));
|
||||
|
||||
v1 = XMVectorMergeXY(v1, v2); // [v1.x v2.x --- ---]
|
||||
v3 = XMVectorMergeXY(v3, v4); // [v3.x v4.x --- ---]
|
||||
|
@ -328,7 +328,7 @@ namespace
|
||||
return HRESULT_E_NOT_SUPPORTED;
|
||||
}
|
||||
|
||||
size_t maxColorMap = size_t(pHeader->wColorMapFirst) + size_t(pHeader->wColorMapLength);
|
||||
const size_t maxColorMap = size_t(pHeader->wColorMapFirst) + size_t(pHeader->wColorMapLength);
|
||||
if (maxColorMap > 256)
|
||||
{
|
||||
return HRESULT_E_NOT_SUPPORTED;
|
||||
@ -920,7 +920,7 @@ namespace
|
||||
TGA_FLAGS flags,
|
||||
_In_ const Image* image,
|
||||
_In_ uint32_t convFlags,
|
||||
_In_opt_ uint8_t* palette) noexcept
|
||||
_In_opt_ const uint8_t* palette) noexcept
|
||||
{
|
||||
assert(pSource && size > 0);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user