From a03df746f0573b374ddf06a69af969cbf2db850c Mon Sep 17 00:00:00 2001 From: pb101 Date: Fri, 22 Jan 2016 14:41:23 +0100 Subject: [PATCH] Fix harmless parameter shadowing warnings Rename local variables to avoid clashes with the function parameters. Closes #17343, #17344. --- src/common/txtstrm.cpp | 6 +++--- src/msw/toolbar.cpp | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/common/txtstrm.cpp b/src/common/txtstrm.cpp index 3b2c44949f..8c48cd6c77 100644 --- a/src/common/txtstrm.cpp +++ b/src/common/txtstrm.cpp @@ -543,8 +543,8 @@ wxTextOutputStream& wxTextOutputStream::PutChar(wxChar c) { for ( size_t n = 0; n < len; n++ ) { - const char c = buffer[n]; - if ( c == '\n' ) + const char c2 = buffer[n]; + if ( c2 == '\n' ) { switch ( m_mode ) { @@ -566,7 +566,7 @@ wxTextOutputStream& wxTextOutputStream::PutChar(wxChar c) } } - m_output.Write(&c, 1); + m_output.Write(&c2, 1); } } #else // SIZEOF_WCHAR_T == 4 diff --git a/src/msw/toolbar.cpp b/src/msw/toolbar.cpp index 33b75621c4..e69bc03ef1 100644 --- a/src/msw/toolbar.cpp +++ b/src/msw/toolbar.cpp @@ -633,14 +633,14 @@ bool wxToolBar::DoDeleteTool(size_t pos, wxToolBarToolBase *tool) wxToolBarToolsList::compatibility_iterator node; for ( node = m_tools.Find(tool); node; node = node->GetNext() ) { - wxToolBarTool * const tool = static_cast(node->GetData()); + wxToolBarTool * const ctool = static_cast(node->GetData()); - if ( tool->IsToBeDeleted() ) + if ( ctool->IsToBeDeleted() ) continue; - if ( tool->IsControl() ) + if ( ctool->IsControl() ) { - tool->MoveBy(-delta); + ctool->MoveBy(-delta); } }