]> git.saurik.com Git - wxWidgets.git/commitdiff
Warning fix.
authorWłodzimierz Skiba <abx@abx.art.pl>
Thu, 3 Nov 2005 16:53:29 +0000 (16:53 +0000)
committerWłodzimierz Skiba <abx@abx.art.pl>
Thu, 3 Nov 2005 16:53:29 +0000 (16:53 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@36076 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

samples/richtext/richtext.cpp

index 115d7106a48dbca87f5e745a3d557d5a9229b313..1daf45bee9f2659e588f16f6745ab5e4c02eb056 100644 (file)
@@ -1,5 +1,5 @@
 /////////////////////////////////////////////////////////////////////////////
-// Name:        richedit.cpp
+// Name:        samples/richtext/richtext.cpp
 // Purpose:     wxWidgets rich text editor sample
 // Author:      Julian Smart
 // Modified by:
@@ -728,12 +728,10 @@ void MyFrame::OnOpen(wxCommandEvent& WXUNUSED(event))
 
         if (!path.empty())
         {
-            int fileType = 0;
             int filterIndex = dialog.GetFilterIndex();
-            if (filterIndex < (int) fileTypes.GetCount())
-                fileType = fileTypes[filterIndex];
-            else
-                fileType = wxRICHTEXT_TYPE_TEXT;
+            int fileType = (filterIndex < (int) fileTypes.GetCount())
+                           ? fileTypes[filterIndex]
+                           : wxRICHTEXT_TYPE_TEXT;
             m_richTextCtrl->LoadFile(path, fileType);
         }
     }