mirror of
https://github.com/microsoft/DirectXTex.git
synced 2025-07-09 11:40:14 +02:00
std::ignore usage instead of (void) for ignoring return values
This commit is contained in:
parent
144847dfcc
commit
1363046e2b
@ -130,6 +130,7 @@
|
|||||||
#include <iterator>
|
#include <iterator>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <new>
|
#include <new>
|
||||||
|
#include <tuple>
|
||||||
|
|
||||||
#ifndef WIN32
|
#ifndef WIN32
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
|
@ -390,7 +390,7 @@ namespace
|
|||||||
return E_NOTIMPL;
|
return E_NOTIMPL;
|
||||||
}
|
}
|
||||||
|
|
||||||
HRESULT STDMETHODCALLTYPE Revert(void) override
|
HRESULT STDMETHODCALLTYPE Revert() override
|
||||||
{
|
{
|
||||||
return E_NOTIMPL;
|
return E_NOTIMPL;
|
||||||
}
|
}
|
||||||
@ -635,7 +635,7 @@ namespace
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
(void)PropVariantClear(&value);
|
std::ignore = PropVariantClear(&value);
|
||||||
|
|
||||||
if (sRGB)
|
if (sRGB)
|
||||||
metadata.format = MakeSRGB(metadata.format);
|
metadata.format = MakeSRGB(metadata.format);
|
||||||
@ -889,65 +889,65 @@ namespace
|
|||||||
if (memcmp(&containerFormat, &GUID_ContainerFormatPng, sizeof(GUID)) == 0)
|
if (memcmp(&containerFormat, &GUID_ContainerFormatPng, sizeof(GUID)) == 0)
|
||||||
{
|
{
|
||||||
// Set Software name
|
// Set Software name
|
||||||
(void)metawriter->SetMetadataByName(L"/tEXt/{str=Software}", &value);
|
std::ignore = metawriter->SetMetadataByName(L"/tEXt/{str=Software}", &value);
|
||||||
|
|
||||||
// Set sRGB chunk
|
// Set sRGB chunk
|
||||||
if (sRGB)
|
if (sRGB)
|
||||||
{
|
{
|
||||||
value.vt = VT_UI1;
|
value.vt = VT_UI1;
|
||||||
value.bVal = 0;
|
value.bVal = 0;
|
||||||
(void)metawriter->SetMetadataByName(L"/sRGB/RenderingIntent", &value);
|
std::ignore = metawriter->SetMetadataByName(L"/sRGB/RenderingIntent", &value);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// add gAMA chunk with gamma 1.0
|
// add gAMA chunk with gamma 1.0
|
||||||
value.vt = VT_UI4;
|
value.vt = VT_UI4;
|
||||||
value.uintVal = 100000; // gama value * 100,000 -- i.e. gamma 1.0
|
value.uintVal = 100000; // gama value * 100,000 -- i.e. gamma 1.0
|
||||||
(void)metawriter->SetMetadataByName(L"/gAMA/ImageGamma", &value);
|
std::ignore = metawriter->SetMetadataByName(L"/gAMA/ImageGamma", &value);
|
||||||
|
|
||||||
// remove sRGB chunk which is added by default.
|
// remove sRGB chunk which is added by default.
|
||||||
(void)metawriter->RemoveMetadataByName(L"/sRGB/RenderingIntent");
|
std::ignore = metawriter->RemoveMetadataByName(L"/sRGB/RenderingIntent");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#if (defined(_XBOX_ONE) && defined(_TITLE)) || defined(_GAMING_XBOX)
|
#if (defined(_XBOX_ONE) && defined(_TITLE)) || defined(_GAMING_XBOX)
|
||||||
else if (memcmp(&containerFormat, &GUID_ContainerFormatJpeg, sizeof(GUID)) == 0)
|
else if (memcmp(&containerFormat, &GUID_ContainerFormatJpeg, sizeof(GUID)) == 0)
|
||||||
{
|
{
|
||||||
// Set Software name
|
// Set Software name
|
||||||
(void)metawriter->SetMetadataByName(L"/app1/ifd/{ushort=305}", &value);
|
std::ignore = metawriter->SetMetadataByName(L"/app1/ifd/{ushort=305}", &value);
|
||||||
|
|
||||||
if (sRGB)
|
if (sRGB)
|
||||||
{
|
{
|
||||||
// Set EXIF Colorspace of sRGB
|
// Set EXIF Colorspace of sRGB
|
||||||
value.vt = VT_UI2;
|
value.vt = VT_UI2;
|
||||||
value.uiVal = 1;
|
value.uiVal = 1;
|
||||||
(void)metawriter->SetMetadataByName(L"/app1/ifd/exif/{ushort=40961}", &value);
|
std::ignore = metawriter->SetMetadataByName(L"/app1/ifd/exif/{ushort=40961}", &value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (memcmp(&containerFormat, &GUID_ContainerFormatTiff, sizeof(GUID)) == 0)
|
else if (memcmp(&containerFormat, &GUID_ContainerFormatTiff, sizeof(GUID)) == 0)
|
||||||
{
|
{
|
||||||
// Set Software name
|
// Set Software name
|
||||||
(void)metawriter->SetMetadataByName(L"/ifd/{ushort=305}", &value);
|
std::ignore = metawriter->SetMetadataByName(L"/ifd/{ushort=305}", &value);
|
||||||
|
|
||||||
if (sRGB)
|
if (sRGB)
|
||||||
{
|
{
|
||||||
// Set EXIF Colorspace of sRGB
|
// Set EXIF Colorspace of sRGB
|
||||||
value.vt = VT_UI2;
|
value.vt = VT_UI2;
|
||||||
value.uiVal = 1;
|
value.uiVal = 1;
|
||||||
(void)metawriter->SetMetadataByName(L"/ifd/exif/{ushort=40961}", &value);
|
std::ignore = metawriter->SetMetadataByName(L"/ifd/exif/{ushort=40961}", &value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Set Software name
|
// Set Software name
|
||||||
(void)metawriter->SetMetadataByName(L"System.ApplicationName", &value);
|
std::ignore = metawriter->SetMetadataByName(L"System.ApplicationName", &value);
|
||||||
|
|
||||||
if (sRGB)
|
if (sRGB)
|
||||||
{
|
{
|
||||||
// Set EXIF Colorspace of sRGB
|
// Set EXIF Colorspace of sRGB
|
||||||
value.vt = VT_UI2;
|
value.vt = VT_UI2;
|
||||||
value.uiVal = 1;
|
value.uiVal = 1;
|
||||||
(void)metawriter->SetMetadataByName(L"System.Image.ColorSpace", &value);
|
std::ignore = metawriter->SetMetadataByName(L"System.Image.ColorSpace", &value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@ -1109,7 +1109,7 @@ namespace
|
|||||||
VARIANT varValue;
|
VARIANT varValue;
|
||||||
varValue.vt = VT_BOOL;
|
varValue.vt = VT_BOOL;
|
||||||
varValue.boolVal = VARIANT_TRUE;
|
varValue.boolVal = VARIANT_TRUE;
|
||||||
(void)props->Write(1, &option, &varValue);
|
std::ignore = props->Write(1, &option, &varValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (setCustomProps)
|
if (setCustomProps)
|
||||||
|
@ -13,6 +13,7 @@
|
|||||||
#include <cstddef>
|
#include <cstddef>
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
#include <tuple>
|
||||||
|
|
||||||
#ifndef WIN32
|
#ifndef WIN32
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
@ -98,7 +99,7 @@ public:
|
|||||||
{
|
{
|
||||||
FILE_DISPOSITION_INFO info = {};
|
FILE_DISPOSITION_INFO info = {};
|
||||||
info.DeleteFile = TRUE;
|
info.DeleteFile = TRUE;
|
||||||
(void)SetFileInformationByHandle(m_handle, FileDispositionInfo, &info, sizeof(info));
|
std::ignore = SetFileInformationByHandle(m_handle, FileDispositionInfo, &info, sizeof(info));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -29,6 +29,7 @@
|
|||||||
#include <cstring>
|
#include <cstring>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <new>
|
#include <new>
|
||||||
|
#include <tuple>
|
||||||
|
|
||||||
#include <wincodec.h>
|
#include <wincodec.h>
|
||||||
|
|
||||||
@ -212,7 +213,7 @@ namespace
|
|||||||
{
|
{
|
||||||
FILE_DISPOSITION_INFO info = {};
|
FILE_DISPOSITION_INFO info = {};
|
||||||
info.DeleteFile = TRUE;
|
info.DeleteFile = TRUE;
|
||||||
(void)SetFileInformationByHandle(m_handle, FileDispositionInfo, &info, sizeof(info));
|
std::ignore = SetFileInformationByHandle(m_handle, FileDispositionInfo, &info, sizeof(info));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1049,7 +1050,7 @@ HRESULT DirectX::SaveWICTextureToFile(
|
|||||||
VARIANT varValue;
|
VARIANT varValue;
|
||||||
varValue.vt = VT_BOOL;
|
varValue.vt = VT_BOOL;
|
||||||
varValue.boolVal = VARIANT_TRUE;
|
varValue.boolVal = VARIANT_TRUE;
|
||||||
(void)props->Write(1, &option, &varValue);
|
std::ignore = props->Write(1, &option, &varValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (setCustomProps)
|
if (setCustomProps)
|
||||||
@ -1135,37 +1136,37 @@ HRESULT DirectX::SaveWICTextureToFile(
|
|||||||
if (memcmp(&guidContainerFormat, &GUID_ContainerFormatPng, sizeof(GUID)) == 0)
|
if (memcmp(&guidContainerFormat, &GUID_ContainerFormatPng, sizeof(GUID)) == 0)
|
||||||
{
|
{
|
||||||
// Set Software name
|
// Set Software name
|
||||||
(void)metawriter->SetMetadataByName(L"/tEXt/{str=Software}", &value);
|
std::ignore = metawriter->SetMetadataByName(L"/tEXt/{str=Software}", &value);
|
||||||
|
|
||||||
// Set sRGB chunk
|
// Set sRGB chunk
|
||||||
if (sRGB)
|
if (sRGB)
|
||||||
{
|
{
|
||||||
value.vt = VT_UI1;
|
value.vt = VT_UI1;
|
||||||
value.bVal = 0;
|
value.bVal = 0;
|
||||||
(void)metawriter->SetMetadataByName(L"/sRGB/RenderingIntent", &value);
|
std::ignore = metawriter->SetMetadataByName(L"/sRGB/RenderingIntent", &value);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// add gAMA chunk with gamma 1.0
|
// add gAMA chunk with gamma 1.0
|
||||||
value.vt = VT_UI4;
|
value.vt = VT_UI4;
|
||||||
value.uintVal = 100000; // gama value * 100,000 -- i.e. gamma 1.0
|
value.uintVal = 100000; // gama value * 100,000 -- i.e. gamma 1.0
|
||||||
(void)metawriter->SetMetadataByName(L"/gAMA/ImageGamma", &value);
|
std::ignore = metawriter->SetMetadataByName(L"/gAMA/ImageGamma", &value);
|
||||||
|
|
||||||
// remove sRGB chunk which is added by default.
|
// remove sRGB chunk which is added by default.
|
||||||
(void)metawriter->RemoveMetadataByName(L"/sRGB/RenderingIntent");
|
std::ignore = metawriter->RemoveMetadataByName(L"/sRGB/RenderingIntent");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Set Software name
|
// Set Software name
|
||||||
(void)metawriter->SetMetadataByName(L"System.ApplicationName", &value);
|
std::ignore = metawriter->SetMetadataByName(L"System.ApplicationName", &value);
|
||||||
|
|
||||||
if (sRGB)
|
if (sRGB)
|
||||||
{
|
{
|
||||||
// Set EXIF Colorspace of sRGB
|
// Set EXIF Colorspace of sRGB
|
||||||
value.vt = VT_UI2;
|
value.vt = VT_UI2;
|
||||||
value.uiVal = 1;
|
value.uiVal = 1;
|
||||||
(void)metawriter->SetMetadataByName(L"System.Image.ColorSpace", &value);
|
std::ignore = metawriter->SetMetadataByName(L"System.Image.ColorSpace", &value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -29,6 +29,7 @@
|
|||||||
#include <cstring>
|
#include <cstring>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <new>
|
#include <new>
|
||||||
|
#include <tuple>
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
#include <wincodec.h>
|
#include <wincodec.h>
|
||||||
@ -234,7 +235,7 @@ namespace
|
|||||||
{
|
{
|
||||||
FILE_DISPOSITION_INFO info = {};
|
FILE_DISPOSITION_INFO info = {};
|
||||||
info.DeleteFile = TRUE;
|
info.DeleteFile = TRUE;
|
||||||
(void)SetFileInformationByHandle(m_handle, FileDispositionInfo, &info, sizeof(info));
|
std::ignore = SetFileInformationByHandle(m_handle, FileDispositionInfo, &info, sizeof(info));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1226,7 +1227,7 @@ HRESULT DirectX::SaveWICTextureToFile(
|
|||||||
VARIANT varValue;
|
VARIANT varValue;
|
||||||
varValue.vt = VT_BOOL;
|
varValue.vt = VT_BOOL;
|
||||||
varValue.boolVal = VARIANT_TRUE;
|
varValue.boolVal = VARIANT_TRUE;
|
||||||
(void)props->Write(1, &option, &varValue);
|
std::ignore = props->Write(1, &option, &varValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (setCustomProps)
|
if (setCustomProps)
|
||||||
@ -1303,37 +1304,37 @@ HRESULT DirectX::SaveWICTextureToFile(
|
|||||||
if (memcmp(&guidContainerFormat, &GUID_ContainerFormatPng, sizeof(GUID)) == 0)
|
if (memcmp(&guidContainerFormat, &GUID_ContainerFormatPng, sizeof(GUID)) == 0)
|
||||||
{
|
{
|
||||||
// Set Software name
|
// Set Software name
|
||||||
(void)metawriter->SetMetadataByName(L"/tEXt/{str=Software}", &value);
|
std::ignore = metawriter->SetMetadataByName(L"/tEXt/{str=Software}", &value);
|
||||||
|
|
||||||
// Set sRGB chunk
|
// Set sRGB chunk
|
||||||
if (sRGB)
|
if (sRGB)
|
||||||
{
|
{
|
||||||
value.vt = VT_UI1;
|
value.vt = VT_UI1;
|
||||||
value.bVal = 0;
|
value.bVal = 0;
|
||||||
(void)metawriter->SetMetadataByName(L"/sRGB/RenderingIntent", &value);
|
std::ignore = metawriter->SetMetadataByName(L"/sRGB/RenderingIntent", &value);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// add gAMA chunk with gamma 1.0
|
// add gAMA chunk with gamma 1.0
|
||||||
value.vt = VT_UI4;
|
value.vt = VT_UI4;
|
||||||
value.uintVal = 100000; // gama value * 100,000 -- i.e. gamma 1.0
|
value.uintVal = 100000; // gama value * 100,000 -- i.e. gamma 1.0
|
||||||
(void)metawriter->SetMetadataByName(L"/gAMA/ImageGamma", &value);
|
std::ignore = metawriter->SetMetadataByName(L"/gAMA/ImageGamma", &value);
|
||||||
|
|
||||||
// remove sRGB chunk which is added by default.
|
// remove sRGB chunk which is added by default.
|
||||||
(void)metawriter->RemoveMetadataByName(L"/sRGB/RenderingIntent");
|
std::ignore = metawriter->RemoveMetadataByName(L"/sRGB/RenderingIntent");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Set Software name
|
// Set Software name
|
||||||
(void)metawriter->SetMetadataByName(L"System.ApplicationName", &value);
|
std::ignore = metawriter->SetMetadataByName(L"System.ApplicationName", &value);
|
||||||
|
|
||||||
if (sRGB)
|
if (sRGB)
|
||||||
{
|
{
|
||||||
// Set EXIF Colorspace of sRGB
|
// Set EXIF Colorspace of sRGB
|
||||||
value.vt = VT_UI2;
|
value.vt = VT_UI2;
|
||||||
value.uiVal = 1;
|
value.uiVal = 1;
|
||||||
(void)metawriter->SetMetadataByName(L"System.Image.ColorSpace", &value);
|
std::ignore = metawriter->SetMetadataByName(L"System.Image.ColorSpace", &value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -23,6 +23,7 @@
|
|||||||
#include <cstring>
|
#include <cstring>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <new>
|
#include <new>
|
||||||
|
#include <tuple>
|
||||||
|
|
||||||
#include <wincodec.h>
|
#include <wincodec.h>
|
||||||
|
|
||||||
@ -225,7 +226,7 @@ namespace
|
|||||||
{
|
{
|
||||||
FILE_DISPOSITION_INFO info = {};
|
FILE_DISPOSITION_INFO info = {};
|
||||||
info.DeleteFile = TRUE;
|
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;
|
VARIANT varValue;
|
||||||
varValue.vt = VT_BOOL;
|
varValue.vt = VT_BOOL;
|
||||||
varValue.boolVal = VARIANT_TRUE;
|
varValue.boolVal = VARIANT_TRUE;
|
||||||
(void)props->Write(1, &option, &varValue);
|
std::ignore = props->Write(1, &option, &varValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (setCustomProps)
|
if (setCustomProps)
|
||||||
@ -923,12 +924,12 @@ HRESULT DirectX::SaveWICTextureToFile(
|
|||||||
if (memcmp(&guidContainerFormat, &GUID_ContainerFormatPng, sizeof(GUID)) == 0)
|
if (memcmp(&guidContainerFormat, &GUID_ContainerFormatPng, sizeof(GUID)) == 0)
|
||||||
{
|
{
|
||||||
// Set Software name
|
// Set Software name
|
||||||
(void)metawriter->SetMetadataByName(L"/tEXt/{str=Software}", &value);
|
std::ignore = metawriter->SetMetadataByName(L"/tEXt/{str=Software}", &value);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Set Software name
|
// Set Software name
|
||||||
(void)metawriter->SetMetadataByName(L"System.ApplicationName", &value);
|
std::ignore = metawriter->SetMetadataByName(L"System.ApplicationName", &value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -35,6 +35,7 @@
|
|||||||
#include <new>
|
#include <new>
|
||||||
#include <set>
|
#include <set>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
#include <tuple>
|
||||||
#include <utility>
|
#include <utility>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
@ -1980,7 +1981,7 @@ int __cdecl wmain(_In_ int argc, _In_z_count_(argc) wchar_t* argv[])
|
|||||||
|
|
||||||
if (dwOptions & (1 << OPT_TOLOWER))
|
if (dwOptions & (1 << OPT_TOLOWER))
|
||||||
{
|
{
|
||||||
(void)_wcslwr_s(szOutputFile);
|
std::ignore = _wcslwr_s(szOutputFile);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (~dwOptions & (1 << OPT_OVERWRITE))
|
if (~dwOptions & (1 << OPT_OVERWRITE))
|
||||||
@ -2048,7 +2049,7 @@ int __cdecl wmain(_In_ int argc, _In_z_count_(argc) wchar_t* argv[])
|
|||||||
|
|
||||||
if (dwOptions & (1 << OPT_TOLOWER))
|
if (dwOptions & (1 << OPT_TOLOWER))
|
||||||
{
|
{
|
||||||
(void)_wcslwr_s(szOutputFile);
|
std::ignore = _wcslwr_s(szOutputFile);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (~dwOptions & (1 << OPT_OVERWRITE))
|
if (~dwOptions & (1 << OPT_OVERWRITE))
|
||||||
@ -2119,7 +2120,7 @@ int __cdecl wmain(_In_ int argc, _In_z_count_(argc) wchar_t* argv[])
|
|||||||
|
|
||||||
if (dwOptions & (1 << OPT_TOLOWER))
|
if (dwOptions & (1 << OPT_TOLOWER))
|
||||||
{
|
{
|
||||||
(void)_wcslwr_s(szOutputFile);
|
std::ignore = _wcslwr_s(szOutputFile);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (~dwOptions & (1 << OPT_OVERWRITE))
|
if (~dwOptions & (1 << OPT_OVERWRITE))
|
||||||
@ -2229,7 +2230,7 @@ int __cdecl wmain(_In_ int argc, _In_z_count_(argc) wchar_t* argv[])
|
|||||||
|
|
||||||
if (dwOptions & (1 << OPT_TOLOWER))
|
if (dwOptions & (1 << OPT_TOLOWER))
|
||||||
{
|
{
|
||||||
(void)_wcslwr_s(szOutputFile);
|
std::ignore = _wcslwr_s(szOutputFile);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (~dwOptions & (1 << OPT_OVERWRITE))
|
if (~dwOptions & (1 << OPT_OVERWRITE))
|
||||||
|
@ -52,7 +52,7 @@ namespace
|
|||||||
{
|
{
|
||||||
FILE_DISPOSITION_INFO info = {};
|
FILE_DISPOSITION_INFO info = {};
|
||||||
info.DeleteFile = TRUE;
|
info.DeleteFile = TRUE;
|
||||||
(void)SetFileInformationByHandle(m_handle, FileDispositionInfo, &info, sizeof(info));
|
std::ignore = SetFileInformationByHandle(m_handle, FileDispositionInfo, &info, sizeof(info));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -36,6 +36,7 @@
|
|||||||
#include <new>
|
#include <new>
|
||||||
#include <set>
|
#include <set>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
#include <tuple>
|
||||||
|
|
||||||
#include <wrl\client.h>
|
#include <wrl\client.h>
|
||||||
|
|
||||||
@ -1958,10 +1959,10 @@ int __cdecl wmain(_In_ int argc, _In_z_count_(argc) wchar_t* argv[])
|
|||||||
}
|
}
|
||||||
|
|
||||||
LARGE_INTEGER qpcFreq = {};
|
LARGE_INTEGER qpcFreq = {};
|
||||||
(void)QueryPerformanceFrequency(&qpcFreq);
|
std::ignore = QueryPerformanceFrequency(&qpcFreq);
|
||||||
|
|
||||||
LARGE_INTEGER qpcStart = {};
|
LARGE_INTEGER qpcStart = {};
|
||||||
(void)QueryPerformanceCounter(&qpcStart);
|
std::ignore = QueryPerformanceCounter(&qpcStart);
|
||||||
|
|
||||||
// Convert images
|
// Convert images
|
||||||
bool sizewarn = false;
|
bool sizewarn = false;
|
||||||
@ -3549,7 +3550,7 @@ int __cdecl wmain(_In_ int argc, _In_z_count_(argc) wchar_t* argv[])
|
|||||||
|
|
||||||
if (dwOptions & (uint64_t(1) << OPT_TOLOWER))
|
if (dwOptions & (uint64_t(1) << OPT_TOLOWER))
|
||||||
{
|
{
|
||||||
(void)_wcslwr_s(szDest);
|
std::ignore = _wcslwr_s(szDest);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (wcslen(szDest) > _MAX_PATH)
|
if (wcslen(szDest) > _MAX_PATH)
|
||||||
@ -3632,7 +3633,7 @@ int __cdecl wmain(_In_ int argc, _In_z_count_(argc) wchar_t* argv[])
|
|||||||
options.pstrName = const_cast<wchar_t*>(L"ImageQuality");
|
options.pstrName = const_cast<wchar_t*>(L"ImageQuality");
|
||||||
varValues.vt = VT_R4;
|
varValues.vt = VT_R4;
|
||||||
varValues.fltVal = (wicLossless) ? 1.f : wicQuality;
|
varValues.fltVal = (wicLossless) ? 1.f : wicQuality;
|
||||||
(void)props->Write(1, &options, &varValues);
|
std::ignore = props->Write(1, &options, &varValues);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -3652,7 +3653,7 @@ int __cdecl wmain(_In_ int argc, _In_z_count_(argc) wchar_t* argv[])
|
|||||||
varValues.vt = VT_R4;
|
varValues.vt = VT_R4;
|
||||||
varValues.fltVal = wicQuality;
|
varValues.fltVal = wicQuality;
|
||||||
}
|
}
|
||||||
(void)props->Write(1, &options, &varValues);
|
std::ignore = props->Write(1, &options, &varValues);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -3674,7 +3675,7 @@ int __cdecl wmain(_In_ int argc, _In_z_count_(argc) wchar_t* argv[])
|
|||||||
varValues.vt = VT_R4;
|
varValues.vt = VT_R4;
|
||||||
varValues.fltVal = wicQuality;
|
varValues.fltVal = wicQuality;
|
||||||
}
|
}
|
||||||
(void)props->Write(1, &options, &varValues);
|
std::ignore = props->Write(1, &options, &varValues);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -3710,7 +3711,7 @@ int __cdecl wmain(_In_ int argc, _In_z_count_(argc) wchar_t* argv[])
|
|||||||
if (dwOptions & (uint64_t(1) << OPT_TIMING))
|
if (dwOptions & (uint64_t(1) << OPT_TIMING))
|
||||||
{
|
{
|
||||||
LARGE_INTEGER qpcEnd = {};
|
LARGE_INTEGER qpcEnd = {};
|
||||||
(void)QueryPerformanceCounter(&qpcEnd);
|
std::ignore = QueryPerformanceCounter(&qpcEnd);
|
||||||
|
|
||||||
LONGLONG delta = qpcEnd.QuadPart - qpcStart.QuadPart;
|
LONGLONG delta = qpcEnd.QuadPart - qpcStart.QuadPart;
|
||||||
wprintf(L"\n Processing time: %f seconds\n", double(delta) / double(qpcFreq.QuadPart));
|
wprintf(L"\n Processing time: %f seconds\n", double(delta) / double(qpcFreq.QuadPart));
|
||||||
|
@ -32,9 +32,10 @@
|
|||||||
#include <list>
|
#include <list>
|
||||||
#include <locale>
|
#include <locale>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
#include <new>
|
||||||
#include <set>
|
#include <set>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <new>
|
#include <tuple>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include <dxgiformat.h>
|
#include <dxgiformat.h>
|
||||||
@ -3549,7 +3550,7 @@ int __cdecl wmain(_In_ int argc, _In_z_count_(argc) wchar_t* argv[])
|
|||||||
|
|
||||||
if (dwOptions & (1 << OPT_TOLOWER))
|
if (dwOptions & (1 << OPT_TOLOWER))
|
||||||
{
|
{
|
||||||
(void)_wcslwr_s(szOutputFile);
|
std::ignore = _wcslwr_s(szOutputFile);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (~dwOptions & (1 << OPT_OVERWRITE))
|
if (~dwOptions & (1 << OPT_OVERWRITE))
|
||||||
|
@ -38,6 +38,7 @@
|
|||||||
#include <iterator>
|
#include <iterator>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <new>
|
#include <new>
|
||||||
|
#include <tuple>
|
||||||
|
|
||||||
#ifdef __clang__
|
#ifdef __clang__
|
||||||
#pragma clang diagnostic ignored "-Wcovered-switch-default"
|
#pragma clang diagnostic ignored "-Wcovered-switch-default"
|
||||||
@ -557,7 +558,7 @@ namespace
|
|||||||
sRGB = (loadFlags & WIC_LOADER_SRGB_DEFAULT) != 0;
|
sRGB = (loadFlags & WIC_LOADER_SRGB_DEFAULT) != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
(void)PropVariantClear(&value);
|
std::ignore = PropVariantClear(&value);
|
||||||
|
|
||||||
if (sRGB)
|
if (sRGB)
|
||||||
format = MakeSRGB(format);
|
format = MakeSRGB(format);
|
||||||
|
@ -28,6 +28,7 @@
|
|||||||
#include <cstring>
|
#include <cstring>
|
||||||
#include <iterator>
|
#include <iterator>
|
||||||
#include <new>
|
#include <new>
|
||||||
|
#include <tuple>
|
||||||
|
|
||||||
#include <wincodec.h>
|
#include <wincodec.h>
|
||||||
|
|
||||||
@ -469,7 +470,7 @@ namespace
|
|||||||
sRGB = (loadFlags & WIC_LOADER_SRGB_DEFAULT) != 0;
|
sRGB = (loadFlags & WIC_LOADER_SRGB_DEFAULT) != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
(void)PropVariantClear(&value);
|
std::ignore = PropVariantClear(&value);
|
||||||
|
|
||||||
if (sRGB)
|
if (sRGB)
|
||||||
format = MakeSRGB(format);
|
format = MakeSRGB(format);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user