mirror of
https://github.com/microsoft/DirectXTex.git
synced 2026-02-04 12:16:14 +01:00
std::ignore usage instead of (void) for ignoring return values
This commit is contained in:
@@ -23,6 +23,7 @@
|
||||
#include <cstring>
|
||||
#include <memory>
|
||||
#include <new>
|
||||
#include <tuple>
|
||||
|
||||
#include <wincodec.h>
|
||||
|
||||
@@ -225,7 +226,7 @@ namespace
|
||||
{
|
||||
FILE_DISPOSITION_INFO info = {};
|
||||
info.DeleteFile = TRUE;
|
||||
(void)SetFileInformationByHandle(m_handle, FileDispositionInfo, &info, sizeof(info));
|
||||
std::ignore = SetFileInformationByHandle(m_handle, FileDispositionInfo, &info, sizeof(info));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -831,7 +832,7 @@ HRESULT DirectX::SaveWICTextureToFile(
|
||||
VARIANT varValue;
|
||||
varValue.vt = VT_BOOL;
|
||||
varValue.boolVal = VARIANT_TRUE;
|
||||
(void)props->Write(1, &option, &varValue);
|
||||
std::ignore = props->Write(1, &option, &varValue);
|
||||
}
|
||||
|
||||
if (setCustomProps)
|
||||
@@ -923,12 +924,12 @@ HRESULT DirectX::SaveWICTextureToFile(
|
||||
if (memcmp(&guidContainerFormat, &GUID_ContainerFormatPng, sizeof(GUID)) == 0)
|
||||
{
|
||||
// Set Software name
|
||||
(void)metawriter->SetMetadataByName(L"/tEXt/{str=Software}", &value);
|
||||
std::ignore = metawriter->SetMetadataByName(L"/tEXt/{str=Software}", &value);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Set Software name
|
||||
(void)metawriter->SetMetadataByName(L"System.ApplicationName", &value);
|
||||
std::ignore = metawriter->SetMetadataByName(L"System.ApplicationName", &value);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user