mirror of
https://github.com/microsoft/DirectXTex.git
synced 2026-02-13 08:06:12 +01:00
Minor code review
This commit is contained in:
@@ -550,7 +550,7 @@ HRESULT DirectX::_EncodeDDSHeader(
|
||||
flags |= DDS_FLAGS_FORCE_DX10_EXT;
|
||||
}
|
||||
|
||||
DDS_PIXELFORMAT ddpf = { 0 };
|
||||
DDS_PIXELFORMAT ddpf = {};
|
||||
if (!(flags & DDS_FLAGS_FORCE_DX10_EXT))
|
||||
{
|
||||
switch (metadata.format)
|
||||
|
||||
@@ -928,7 +928,7 @@ HRESULT DirectX::Resize(
|
||||
|
||||
bool usewic = !metadata.IsPMAlpha() && UseWICFiltering(metadata.format, filter);
|
||||
|
||||
WICPixelFormatGUID pfGUID = { 0 };
|
||||
WICPixelFormatGUID pfGUID = {};
|
||||
bool wicpf = (usewic) ? _DXGIToWIC(metadata.format, pfGUID, true) : false;
|
||||
|
||||
switch (metadata.dimension)
|
||||
|
||||
@@ -801,7 +801,7 @@ namespace
|
||||
if (memcmp(&containerFormat, &GUID_ContainerFormatBmp, sizeof(WICPixelFormatGUID)) == 0 && iswic2)
|
||||
{
|
||||
// Opt-in to the WIC2 support for writing 32-bit Windows BMP files with an alpha channel
|
||||
PROPBAG2 option = { 0 };
|
||||
PROPBAG2 option = {};
|
||||
option.pstrName = const_cast<wchar_t*>(L"EnableV5Header32bppBGRA");
|
||||
|
||||
VARIANT varValue;
|
||||
@@ -1043,7 +1043,7 @@ HRESULT DirectX::LoadFromWICMemory(
|
||||
|
||||
// Get metadata
|
||||
TexMetadata mdata;
|
||||
WICPixelFormatGUID convertGUID = { 0 };
|
||||
WICPixelFormatGUID convertGUID = {};
|
||||
hr = DecodeMetadata(flags, iswic2, decoder.Get(), frame.Get(), mdata, &convertGUID, getMQR);
|
||||
if (FAILED(hr))
|
||||
return hr;
|
||||
@@ -1104,7 +1104,7 @@ HRESULT DirectX::LoadFromWICFile(
|
||||
|
||||
// Get metadata
|
||||
TexMetadata mdata;
|
||||
WICPixelFormatGUID convertGUID = { 0 };
|
||||
WICPixelFormatGUID convertGUID = {};
|
||||
hr = DecodeMetadata(flags, iswic2, decoder.Get(), frame.Get(), mdata, &convertGUID, getMQR);
|
||||
if (FAILED(hr))
|
||||
return hr;
|
||||
@@ -1170,7 +1170,7 @@ HRESULT DirectX::SaveToWICMemory(
|
||||
if (FAILED(hr))
|
||||
return hr;
|
||||
|
||||
LARGE_INTEGER li = { { 0 } };
|
||||
LARGE_INTEGER li = {};
|
||||
hr = stream->Seek(li, STREAM_SEEK_SET, 0);
|
||||
if (FAILED(hr))
|
||||
return hr;
|
||||
@@ -1227,7 +1227,7 @@ HRESULT DirectX::SaveToWICMemory(
|
||||
if (FAILED(hr))
|
||||
return hr;
|
||||
|
||||
LARGE_INTEGER li = { { 0 } };
|
||||
LARGE_INTEGER li = {};
|
||||
hr = stream->Seek(li, STREAM_SEEK_SET, 0);
|
||||
if (FAILED(hr))
|
||||
return hr;
|
||||
|
||||
@@ -2600,7 +2600,7 @@ inline HRESULT D3DX12ParsePipelineStream(const D3D12_PIPELINE_STATE_STREAM_DESC&
|
||||
return E_INVALIDARG;
|
||||
}
|
||||
|
||||
bool SubobjectSeen[D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_MAX_VALID] = {0};
|
||||
bool SubobjectSeen[D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_MAX_VALID] = {};
|
||||
for (SIZE_T CurOffset = 0, SizeOfSubobject = 0; CurOffset < Desc.SizeInBytes; CurOffset += SizeOfSubobject)
|
||||
{
|
||||
BYTE* pStream = static_cast<BYTE*>(Desc.pPipelineStateSubobjectStream)+CurOffset;
|
||||
|
||||
@@ -49,7 +49,7 @@ public:
|
||||
{
|
||||
if (m_handle)
|
||||
{
|
||||
FILE_DISPOSITION_INFO info = { 0 };
|
||||
FILE_DISPOSITION_INFO info = {};
|
||||
info.DeleteFile = TRUE;
|
||||
(void)SetFileInformationByHandle(m_handle, FileDispositionInfo, &info, sizeof(info));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user