]> git.saurik.com Git - wxWidgets.git/commitdiff
suppress some warnings appearing in the optimized build only
authorVadim Zeitlin <vadim@wxwidgets.org>
Wed, 19 Dec 2001 01:56:38 +0000 (01:56 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Wed, 19 Dec 2001 01:56:38 +0000 (01:56 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@13085 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/imagbmp.cpp
src/msw/iniconf.cpp

index 2142d1e59e54cc0858f9abde6d95dfdc97e2938a..2b77f5aa939caf84b5159abd4a153dc8b9b86df1 100644 (file)
@@ -195,12 +195,17 @@ bool wxICOHandler::SaveFile(wxImage *image,
             return FALSE;
         }
         wxUint32 m_Size = cStream.GetSize();
+
+        // wxCountingOutputStream::Ok() always returns TRUE for now and this
+        // "if" provokes VC++ warnings in optimized build
+#if 0
         if (!cStream.Ok())
         {
             if (verbose)
                 wxLogError( _("ICO: Error calculating size of DIB .") );
             return FALSE;
         }
+#endif // 0
 
         m_offset = m_offset + sizeof(ICONDIRENTRY) ;
 
index 1c91682df33170f77f17c8405da3e8f8c3bc2d9c..7bcce6e8f2deb0b2331d92d19a488c61a2a4068e 100644 (file)
@@ -300,13 +300,11 @@ bool wxIniConfig::DoReadString(const wxString& szKey, wxString *pstr) const
     GetProfileString(m_strGroup, strKey, "", szBuf, WXSIZEOF(szBuf));
   }
 
-  if ( ::IsEmpty(szBuf) ) {
+  if ( ::IsEmpty(szBuf) )
     return FALSE;
-  }
-  else {
-    *pstr = szBuf ;
-    return TRUE;
-  }
+
+  *pstr = szBuf;
+  return TRUE;
 }
 
 bool wxIniConfig::DoReadLong(const wxString& szKey, long *pl) const