VC++ release mode warning fixes
authorVadim Zeitlin <vadim@wxwidgets.org>
Sun, 12 Oct 2003 01:46:17 +0000 (01:46 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sun, 12 Oct 2003 01:46:17 +0000 (01:46 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@24156 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/event.cpp
src/common/intl.cpp
src/html/helpdata.cpp

index 44215d1ffc273ea22159f2b5fdf9502c855be24f..2ba914fde273af774b17944d8ffccf8791250a08 100644 (file)
@@ -562,8 +562,6 @@ bool wxMouseEvent::ButtonDClick(int but) const
         case wxMOUSE_BTN_RIGHT:
             return RightDClick();
     }
-
-    return false;
 }
 
 // return true if was a button down event
@@ -587,8 +585,6 @@ bool wxMouseEvent::ButtonDown(int but) const
         case wxMOUSE_BTN_RIGHT:
             return RightDown();
     }
-
-    return false;
 }
 
 // return true if was a button up event
@@ -612,8 +608,6 @@ bool wxMouseEvent::ButtonUp(int but) const
         case wxMOUSE_BTN_RIGHT:
             return RightUp();
     }
-
-    return false;
 }
 
 // return true if the given button is currently changing state
@@ -639,8 +633,6 @@ bool wxMouseEvent::Button(int but) const
         case wxMOUSE_BTN_RIGHT:
             return RightDown() || RightUp() || RightDClick();
     }
-
-    return false;
 }
 
 bool wxMouseEvent::ButtonIsDown(int but) const
@@ -663,8 +655,6 @@ bool wxMouseEvent::ButtonIsDown(int but) const
         case wxMOUSE_BTN_RIGHT:
             return RightIsDown();
     }
-
-    return false;
 }
 
 int wxMouseEvent::GetButton() const
index a383076d0f6342f623c89744add3efcf7e8a8415..36c76c398b09bf25a408065e3780b8b225e50b96 100644 (file)
@@ -672,12 +672,11 @@ wxPluralFormsNode*wxPluralFormsParser::logicalOrExpression()
             rn->setNode(0, un.release());
             return rn.release();
         }
-        else
-        {
-            un->setNode(0, ln.release());
-            un->setNode(1, rn.release());
-            return un.release();
-        }
+
+
+        un->setNode(0, ln.release());
+        un->setNode(1, rn.release());
+        return un.release();
     }
     return ln.release();
 }
@@ -712,12 +711,10 @@ wxPluralFormsNode* wxPluralFormsParser::logicalAndExpression()
             rn->setNode(0, un.release());
             return rn.release();
         }
-        else
-        {
-            un->setNode(0, ln.release());
-            un->setNode(1, rn.release());
-            return un.release();
-        }
+
+        un->setNode(0, ln.release());
+        un->setNode(1, rn.release());
+        return un.release();
     }
     return ln.release();
 }
index 77f2b7ccb9e0ff50b0eedc845fbc9009c35709ed..c0418b8d392ae0a489f003650281efe04cc29eae 100644 (file)
@@ -596,60 +596,58 @@ bool wxHtmlHelpData::AddBook(const wxString& book)
 
         return rt;
     }
-    else
-    {
-        wxFSFile *fi;
-        wxFileSystem fsys;
 
-        wxString title = _("noname"),
-                 safetitle,
-                 start = wxEmptyString,
-                 contents = wxEmptyString,
-                 index = wxEmptyString,
-                 charset = wxEmptyString;
-
-        fi = fsys.OpenFile(book);
-        if (fi == NULL)
-        {
-            wxLogError(_("Cannot open HTML help book: %s"), book.c_str());
-            return FALSE;
-        }
-        fsys.ChangePathTo(book);
+    wxFSFile *fi;
+    wxFileSystem fsys;
 
-        const wxChar *lineptr;
-        wxChar linebuf[300];
-        wxString tmp;
-        wxHtmlFilterPlainText filter;
-        tmp = filter.ReadFile(*fi);
-        lineptr = tmp.c_str();
+    wxString title = _("noname"),
+             safetitle,
+             start = wxEmptyString,
+             contents = wxEmptyString,
+             index = wxEmptyString,
+             charset = wxEmptyString;
 
-        do 
-        {
-            lineptr = ReadLine(lineptr, linebuf, 300);
-            
-            for (wxChar *ch = linebuf; *ch != wxT('\0') && *ch != wxT('='); ch++)
-               *ch = tolower(*ch);
-
-            if (wxStrstr(linebuf, _T("title=")) == linebuf)
-                title = linebuf + wxStrlen(_T("title="));
-            if (wxStrstr(linebuf, _T("default topic=")) == linebuf)
-                start = linebuf + wxStrlen(_T("default topic="));
-            if (wxStrstr(linebuf, _T("index file=")) == linebuf)
-                index = linebuf + wxStrlen(_T("index file="));
-            if (wxStrstr(linebuf, _T("contents file=")) == linebuf)
-                contents = linebuf + wxStrlen(_T("contents file="));
-            if (wxStrstr(linebuf, _T("charset=")) == linebuf)
-                charset = linebuf + wxStrlen(_T("charset="));
-        } while (lineptr != NULL);
-
-        wxFontEncoding enc;
-        if (charset == wxEmptyString) enc = wxFONTENCODING_SYSTEM;
-        else enc = wxFontMapper::Get()->CharsetToEncoding(charset);
-        bool rtval = AddBookParam(*fi, enc,
-                                  title, contents, index, start, fsys.GetPath());
-        delete fi;
-        return rtval;
+    fi = fsys.OpenFile(book);
+    if (fi == NULL)
+    {
+        wxLogError(_("Cannot open HTML help book: %s"), book.c_str());
+        return FALSE;
     }
+    fsys.ChangePathTo(book);
+
+    const wxChar *lineptr;
+    wxChar linebuf[300];
+    wxString tmp;
+    wxHtmlFilterPlainText filter;
+    tmp = filter.ReadFile(*fi);
+    lineptr = tmp.c_str();
+
+    do 
+    {
+        lineptr = ReadLine(lineptr, linebuf, 300);
+        
+        for (wxChar *ch = linebuf; *ch != wxT('\0') && *ch != wxT('='); ch++)
+           *ch = tolower(*ch);
+
+        if (wxStrstr(linebuf, _T("title=")) == linebuf)
+            title = linebuf + wxStrlen(_T("title="));
+        if (wxStrstr(linebuf, _T("default topic=")) == linebuf)
+            start = linebuf + wxStrlen(_T("default topic="));
+        if (wxStrstr(linebuf, _T("index file=")) == linebuf)
+            index = linebuf + wxStrlen(_T("index file="));
+        if (wxStrstr(linebuf, _T("contents file=")) == linebuf)
+            contents = linebuf + wxStrlen(_T("contents file="));
+        if (wxStrstr(linebuf, _T("charset=")) == linebuf)
+            charset = linebuf + wxStrlen(_T("charset="));
+    } while (lineptr != NULL);
+
+    wxFontEncoding enc;
+    if (charset == wxEmptyString) enc = wxFONTENCODING_SYSTEM;
+    else enc = wxFontMapper::Get()->CharsetToEncoding(charset);
+    bool rtval = AddBookParam(*fi, enc,
+                              title, contents, index, start, fsys.GetPath());
+    delete fi;
+    return rtval;
 }
 
 wxString wxHtmlHelpData::FindPageByName(const wxString& x)