]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/filedlgg.cpp
Unlike the preferences item which should only be enabled if it exists and is enabled...
[wxWidgets.git] / src / generic / filedlgg.cpp
index febc457bfea0c74a089ca2aadc73d646cda1451b..638c1173f1367343d0816817f763e74069939be7 100644 (file)
@@ -915,7 +915,7 @@ bool wxGenericFileDialog::Create( wxWindow *parent,
 {
     m_bypassGenericImpl = bypassGenericImpl;
 
-    if (!wxFileDialogBase::Create(parent, message, defaultDir, defaultFile, 
+    if (!wxFileDialogBase::Create(parent, message, defaultDir, defaultFile,
                                   wildCard, style, pos))
     {
         return false;
@@ -1151,12 +1151,13 @@ void wxGenericFileDialog::SetWildcard(const wxString& wildCard)
                                                     wildFilters);
     wxCHECK_RET( count, wxT("wxFileDialog: bad wildcard string") );
 
-    size_t n, old_count = m_choice->GetCount();
-    for ( n = 0; n < count; n++ )
+    const size_t countOld = m_choice->GetCount();
+    size_t n;
+    for ( n = 0; n < countOld; n++ )
     {
         delete (wxString *)m_choice->GetClientData(n);
     }
-    
+
     for ( n = 0; n < count; n++ )
     {
         m_choice->Append( wildDescriptions[n], new wxString( wildFilters[n] ) );