std::ignore usage instead of (void) for ignoring return values

This commit is contained in:
Chuck Walbourn
2021-10-17 11:57:07 -07:00
parent 144847dfcc
commit 1363046e2b
12 changed files with 60 additions and 50 deletions

View File

@@ -35,6 +35,7 @@
#include <new>
#include <set>
#include <string>
#include <tuple>
#include <utility>
#include <vector>
@@ -1980,7 +1981,7 @@ int __cdecl wmain(_In_ int argc, _In_z_count_(argc) wchar_t* argv[])
if (dwOptions & (1 << OPT_TOLOWER))
{
(void)_wcslwr_s(szOutputFile);
std::ignore = _wcslwr_s(szOutputFile);
}
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))
{
(void)_wcslwr_s(szOutputFile);
std::ignore = _wcslwr_s(szOutputFile);
}
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))
{
(void)_wcslwr_s(szOutputFile);
std::ignore = _wcslwr_s(szOutputFile);
}
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))
{
(void)_wcslwr_s(szOutputFile);
std::ignore = _wcslwr_s(szOutputFile);
}
if (~dwOptions & (1 << OPT_OVERWRITE))