From 6883cd4b960b209ea2189fdec271850be53c6442 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 30 Sep 2018 15:37:46 +0200 Subject: [PATCH] Fix harmless variable shadowing warning in the display sample Use different names to avoid warning C4456 given by MSVC 14. --- samples/display/display.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/samples/display/display.cpp b/samples/display/display.cpp index a362ac0255..7c97a54c34 100644 --- a/samples/display/display.cpp +++ b/samples/display/display.cpp @@ -235,8 +235,8 @@ MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size, wxPanel *panel = new wxPanel(this, wxID_ANY); m_book = new wxBookCtrl(panel, wxID_ANY); - const size_t count = wxDisplay::GetCount(); - for ( size_t nDpy = 0; nDpy < count; nDpy++ ) + const size_t countDpy = wxDisplay::GetCount(); + for ( size_t nDpy = 0; nDpy < countDpy; nDpy++ ) { wxDisplay display(nDpy); @@ -288,8 +288,8 @@ MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size, #if wxUSE_DISPLAY wxChoice *choiceModes = new wxChoice(page, Display_ChangeMode); const wxArrayVideoModes modes = display.GetModes(); - const size_t count = modes.GetCount(); - for ( size_t nMode = 0; nMode < count; nMode++ ) + const size_t countModes = modes.GetCount(); + for ( size_t nMode = 0; nMode < countModes; nMode++ ) { const wxVideoMode& mode = modes[nMode];