From 5066bff04ec594a782ca9d359bfd4d81b62afd0f Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 30 Jan 2016 22:18:43 +0100 Subject: [PATCH] Fix harmless warning about shadowed variable in image sample Don't redeclare a previously declared variable, just reuse the same one. --- samples/image/image.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/samples/image/image.cpp b/samples/image/image.cpp index c29ddbc529..6cfad304cc 100644 --- a/samples/image/image.cpp +++ b/samples/image/image.cpp @@ -342,12 +342,12 @@ private: wxT("compression = 1, memory = 9, strategy = 2, filter = 5"), }; - int sel = wxGetSingleChoiceIndex(wxT("Select compression option (Cancel to use default)\n"), - wxT("PNG Compression Options"), - WXSIZEOF(compressionChoices), - compressionChoices, - this); - if (sel != -1) + sel = wxGetSingleChoiceIndex(wxT("Select compression option (Cancel to use default)\n"), + wxT("PNG Compression Options"), + WXSIZEOF(compressionChoices), + compressionChoices, + this); + if ( sel != -1 ) { const int zc[] = {9, 9, 9, 9, 1, 1, 9, 9, 9, 9, 1, 1}; const int zm[] = {8, 9, 8, 9, 8, 9, 8, 9, 8, 9, 8, 9};