Get rid of redundancies (#260)

This commit is contained in:
cristei 2021-11-24 01:37:57 +02:00 committed by GitHub
parent 7a08ff19fc
commit bcf514174c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 13 deletions

View File

@ -759,17 +759,9 @@ HRESULT DirectX::CaptureTexture(
return E_FAIL;
}
UINT arraySize, depth;
if (desc.Dimension == D3D12_RESOURCE_DIMENSION_TEXTURE3D)
{
arraySize = 1;
depth = desc.DepthOrArraySize;
}
else
{
arraySize = desc.DepthOrArraySize;
depth = 1;
}
UINT arraySize = (desc.Dimension == D3D12_RESOURCE_DIMENSION_TEXTURE3D)
? 1
: desc.DepthOrArraySize;
for (UINT plane = 0; plane < numberOfPlanes; ++plane)
{

View File

@ -361,8 +361,6 @@ namespace
if (FAILED(hr))
return hr;
blobSize = mBlob.GetBufferSize();
auto ptr = static_cast<uint8_t*>(mBlob.GetBufferPointer());
if (m_streamEOF < size.LowPart)
{