]> git.saurik.com Git - wxWidgets.git/commitdiff
Work around bogus g++ warnings about possibly missing return.
authorVadim Zeitlin <vadim@wxwidgets.org>
Thu, 30 Jun 2011 12:20:47 +0000 (12:20 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Thu, 30 Jun 2011 12:20:47 +0000 (12:20 +0000)
OS X g++ warned that "control may reach end of non-void function" in
wxRichTextHelpInfo::ShowHelp(). This wasn't really the case but change the
function logic slightly to (hopefully) suppress the warning.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68111 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/richtext/richtextuicustomization.h

index d507aba2fa6a5b5ece83b9e3bde8139870cb13b1..7b3afe51c88432edc729626e96fd80459ccd3b72 100644 (file)
@@ -60,10 +60,10 @@ public:
         
     virtual bool ShowHelp(wxWindow* win)
     {
         
     virtual bool ShowHelp(wxWindow* win)
     {
-        if (m_uiCustomization && m_helpTopic != -1)
-            return m_uiCustomization->ShowHelp(win, m_helpTopic);
-        else
+        if ( !m_uiCustomization || m_helpTopic == -1 )
             return false;
             return false;
+
+        return m_uiCustomization->ShowHelp(win, m_helpTopic);
     }
 
     /// Get the help topic identifier.
     }
 
     /// Get the help topic identifier.