Use const for constant local variables in wxWidgets headers

This avoids warnings from MSVS 2017 static analyzer when C++ core rule
set is activated.

Closes https://github.com/wxWidgets/wxWidgets/pull/819
This commit is contained in:
orbitcowboy
2018-05-29 09:54:19 +02:00
committed by Vadim Zeitlin
parent 2fc20abbdd
commit 8dfd799fd5
9 changed files with 19 additions and 19 deletions

View File

@@ -38,7 +38,7 @@
// return true if ok, false otherwise
inline bool wxOleInitialize()
{
HRESULT
const HRESULT
hr = ::OleInitialize(NULL);
// RPC_E_CHANGED_MODE indicates that OLE had been already initialized

View File

@@ -207,7 +207,7 @@ public:
wxCHECK_MSG( m_iocp != INVALID_HANDLE_VALUE, false, "IOCP not init" );
// The special values of 0 will make GetStatus() return Status_Exit.
int ret = PostQueuedCompletionStatus(m_iocp, 0, 0, NULL);
const int ret = PostQueuedCompletionStatus(m_iocp, 0, 0, NULL);
if (!ret)
{
wxLogSysError(_("Unable to post completion status"));
@@ -244,7 +244,7 @@ public:
wxCHECK_MSG( count && watch && overlapped, Status_Error,
"Output parameters can't be NULL" );
int ret = GetQueuedCompletionStatus(m_iocp, count, (ULONG_PTR *)watch,
const int ret = GetQueuedCompletionStatus(m_iocp, count, (ULONG_PTR *)watch,
overlapped, INFINITE);
if ( ret != 0 )
{