]> git.saurik.com Git - wxWidgets.git/commitdiff
added semicolons after wxCHECK()s (part of patch 1450705)
authorVadim Zeitlin <vadim@wxwidgets.org>
Tue, 21 Mar 2006 14:16:34 +0000 (14:16 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Tue, 21 Mar 2006 14:16:34 +0000 (14:16 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38248 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

19 files changed:
docs/changes.txt
src/cocoa/bitmap.mm
src/common/datetime.cpp
src/gtk/bitmap.cpp
src/gtk/dnd.cpp
src/gtk1/bitmap.cpp
src/gtk1/dnd.cpp
src/gtk1/font.cpp
src/mac/carbon/bitmap.cpp
src/mac/carbon/cursor.cpp
src/mac/classic/bitmap.cpp
src/mac/classic/cursor.cpp
src/mgl/bitmap.cpp
src/msw/bitmap.cpp
src/msw/spinbutt.cpp
src/msw/treectrl.cpp
src/os2/bitmap.cpp
src/os2/spinbutt.cpp
src/x11/bitmap.cpp

index 1fe885015c0294efcdb8468c62549e2e8b0e3442..0c8b01160d19aa2588f2ba77cc9d18aba4f565cf 100644 (file)
@@ -10,6 +10,8 @@ INCOMPATIBLE CHANGES SINCE 2.6.x
   even compile)
 - For all wxInputStreams, Eof() becomes true after an attempt has been made
   to read _past_ the end of file.
+- wxCHECK family of macros now must be followed by a semicolon
+
 
 Deprecated methods since 2.6.x and their replacements
 -----------------------------------------------------
index 2e18c0ae2bc837db4584930f152ff530a78be383..dd08e3387af500bd253589935d870e7789d3b897 100644 (file)
@@ -415,11 +415,11 @@ bool wxBitmap::CreateFromXpm(const char **xpm)
 #if wxUSE_IMAGE && wxUSE_XPM
     UnRef();
 
-    wxCHECK_MSG( xpm, false, wxT("invalid XPM data") )
+    wxCHECK_MSG( xpm, false, wxT("invalid XPM data") );
 
     wxXPMDecoder decoder;
     wxImage img = decoder.ReadData(xpm);
-    wxCHECK_MSG( img.Ok(), false, wxT("invalid XPM data") )
+    wxCHECK_MSG( img.Ok(), false, wxT("invalid XPM data") );
 
     *this = wxBitmap(img);
     return true;
index 917e40d3a043e285e09057c6b1ad5a98fe62cbd4..ef51bf684b7b947e3b8ab4434a3e138c8b2b00ea 100644 (file)
@@ -204,13 +204,8 @@ struct tm *wxGmtime_r(const time_t* ticks, struct tm* temp)
 // ----------------------------------------------------------------------------
 
 // debugging helper: just a convenient replacement of wxCHECK()
-#define wxDATETIME_CHECK(expr, msg)     \
-        if ( !(expr) )                  \
-        {                               \
-            wxFAIL_MSG(msg);            \
-            *this = wxInvalidDateTime;  \
-            return *this;               \
-        }
+#define wxDATETIME_CHECK(expr, msg) \
+    wxCHECK2_MSG(expr, *this = wxInvalidDateTime; return *this, msg)
 
 // ----------------------------------------------------------------------------
 // private classes
index cb358da34a5ddfef0f123431535cd47055acf920..48300626d3ac25facd0413d21d165fc978888df3 100644 (file)
@@ -298,7 +298,7 @@ bool wxBitmap::Create( int width, int height, int depth )
         depth = visual->depth;
 
     wxCHECK_MSG( (depth == visual->depth) || (depth == 1) || (depth == 32), false,
-                    wxT("invalid bitmap depth") )
+                    wxT("invalid bitmap depth") );
 
     m_refData = new wxBitmapRefData();
     M_BMPDATA->m_mask = (wxMask *) NULL;
@@ -328,7 +328,7 @@ bool wxBitmap::CreateFromXpm( const char **bits )
 {
     UnRef();
 
-    wxCHECK_MSG( bits != NULL, false, wxT("invalid bitmap data") )
+    wxCHECK_MSG( bits != NULL, false, wxT("invalid bitmap data") );
 
     GdkVisual *visual = wxTheApp->GetGdkVisual();
 
@@ -557,8 +557,8 @@ bool wxBitmap::CreateFromImage(const wxImage& image, int depth)
 {
     UnRef();
 
-    wxCHECK_MSG( image.Ok(), false, wxT("invalid image") )
-    wxCHECK_MSG( depth == -1 || depth == 1, false, wxT("invalid bitmap depth") )
+    wxCHECK_MSG( image.Ok(), false, wxT("invalid image") );
+    wxCHECK_MSG( depth == -1 || depth == 1, false, wxT("invalid bitmap depth") );
 
     if (image.GetWidth() <= 0 || image.GetHeight() <= 0)
         return false;
index 884ad11f274d60cd4661ba7034eda66418b58295..794505a24810241db5cf9d71bcbe6e1a6b85ba3b 100644 (file)
@@ -345,7 +345,7 @@ static gboolean target_drag_drop( GtkWidget *widget,
         GdkAtom format = drop_target->GetMatchingPair();
 
         // this does happen somehow, see bug 555111
-        wxCHECK_MSG( format, FALSE, _T("no matching GdkAtom for format?") )
+        wxCHECK_MSG( format, FALSE, _T("no matching GdkAtom for format?") );
 
 /*
         GdkDragAction action = GDK_ACTION_MOVE;
index 8237eaa33872cebf2df221282294d19928f56e79..f2b41e94449f2760177a2bf5033a2b0b7fb1a5c0 100644 (file)
@@ -315,7 +315,7 @@ bool wxBitmap::CreateFromXpm( const char **bits )
 {
     UnRef();
 
-    wxCHECK_MSG( bits != NULL, false, wxT("invalid bitmap data") )
+    wxCHECK_MSG( bits != NULL, false, wxT("invalid bitmap data") );
 
     GdkVisual *visual = wxTheApp->GetGdkVisual();
 
@@ -527,8 +527,8 @@ bool wxBitmap::CreateFromImage(const wxImage& image, int depth)
 {
     UnRef();
 
-    wxCHECK_MSG( image.Ok(), false, wxT("invalid image") )
-    wxCHECK_MSG( depth == -1 || depth == 1, false, wxT("invalid bitmap depth") )
+    wxCHECK_MSG( image.Ok(), false, wxT("invalid image") );
+    wxCHECK_MSG( depth == -1 || depth == 1, false, wxT("invalid bitmap depth") );
 
     if (image.GetWidth() <= 0 || image.GetHeight() <= 0)
         return false;
index 3c4ce2dc54d3ab6bd33be05bbc889c12c820a576..46a175b0934d3011e2169564148f1a9197965937 100644 (file)
@@ -359,7 +359,7 @@ static gboolean target_drag_drop( GtkWidget *widget,
         GdkAtom format = drop_target->GetMatchingPair();
 
         // this does happen somehow, see bug 555111
-        wxCHECK_MSG( format, FALSE, _T("no matching GdkAtom for format?") )
+        wxCHECK_MSG( format, FALSE, _T("no matching GdkAtom for format?") );
 
 /*
         GdkDragAction action = GDK_ACTION_MOVE;
index 4d3e493fdd8206d3d6f8a25032c677ad6b48910c..def79ff7faf6721c487a1aeda8fd3256a95693f1 100644 (file)
@@ -757,7 +757,7 @@ GdkFont *wxFont::GetInternalFont( float scale ) const
 {
     GdkFont *font = (GdkFont *) NULL;
 
-    wxCHECK_MSG( Ok(), font, wxT("invalid font") )
+    wxCHECK_MSG( Ok(), font, wxT("invalid font") );
 
     long int_scale = long(scale * 100.0 + 0.5); // key for fontlist
     int point_scale = (int)((M_FONTDATA->m_pointSize * 10 * int_scale) / 100);
index 05cc1a72e7d97974d50485b9075cd0f9bdb649e6..89f0d0e12705f8df38b77f9e84c97e90f88ac565 100644 (file)
@@ -876,11 +876,11 @@ void wxBitmap::EndRawAccess()
 bool wxBitmap::CreateFromXpm(const char **bits)
 {
 #if wxUSE_IMAGE
-    wxCHECK_MSG( bits != NULL, false, wxT("invalid bitmap data") )
+    wxCHECK_MSG( bits != NULL, false, wxT("invalid bitmap data") );
 
     wxXPMDecoder decoder;
     wxImage img = decoder.ReadData(bits);
-    wxCHECK_MSG( img.Ok(), false, wxT("invalid bitmap data") )
+    wxCHECK_MSG( img.Ok(), false, wxT("invalid bitmap data") );
 
     *this = wxBitmap(img);
 
@@ -1027,7 +1027,7 @@ bool wxBitmap::Create(void *data, wxBitmapType type, int width, int height, int
 
 wxBitmap::wxBitmap(const wxImage& image, int depth)
 {
-    wxCHECK_RET( image.Ok(), wxT("invalid image") )
+    wxCHECK_RET( image.Ok(), wxT("invalid image") );
 
     // width and height of the device-dependent bitmap
     int width = image.GetWidth();
index ef3b9216e3b6665b7d2564f03c5a02a572d0cb28..caa824901d391cd8c056717fb622fce4f46b27ad 100644 (file)
@@ -262,10 +262,10 @@ wxCursor::wxCursor(char **bits)
 bool wxCursor::CreateFromXpm(const char **bits)
 {
 #if wxUSE_IMAGE
-    wxCHECK_MSG( bits != NULL, false, wxT("invalid cursor data") )
+    wxCHECK_MSG( bits != NULL, false, wxT("invalid cursor data") );
     wxXPMDecoder decoder;
     wxImage img = decoder.ReadData(bits);
-    wxCHECK_MSG( img.Ok(), false, wxT("invalid cursor data") )
+    wxCHECK_MSG( img.Ok(), false, wxT("invalid cursor data") );
     CreateFromImage( img ) ;
     return true;
 #else
index 65ea36c8319503f595683e611a9bd5114ceeadfa..e51b3ca7b6b18662392e06d50ccda2d448d22646 100644 (file)
@@ -508,10 +508,10 @@ wxBitmap::wxBitmap(const wxString& filename, wxBitmapType type)
 
 bool wxBitmap::CreateFromXpm(const char **bits)
 {
-    wxCHECK_MSG( bits != NULL, FALSE, wxT("invalid bitmap data") )
+    wxCHECK_MSG( bits != NULL, FALSE, wxT("invalid bitmap data") );
     wxXPMDecoder decoder;
     wxImage img = decoder.ReadData(bits);
-    wxCHECK_MSG( img.Ok(), FALSE, wxT("invalid bitmap data") )
+    wxCHECK_MSG( img.Ok(), FALSE, wxT("invalid bitmap data") );
     *this = wxBitmap(img);
     return TRUE;
 }
@@ -718,8 +718,8 @@ bool wxBitmap::Create(void *data, wxBitmapType type, int width, int height, int
 
 wxBitmap::wxBitmap(const wxImage& image, int depth)
 {
-    wxCHECK_RET( image.Ok(), wxT("invalid image") )
-    wxCHECK_RET( depth == -1, wxT("invalid bitmap depth") )
+    wxCHECK_RET( image.Ok(), wxT("invalid image") );
+    wxCHECK_RET( depth == -1, wxT("invalid bitmap depth") );
 
     m_refData = new wxBitmapRefData();
 
index 71682cf5da636378241f4ef56ba0599ba9ebcca0..3f7e44d3b740ebfce091810595bd52d8401f683f 100644 (file)
@@ -94,10 +94,10 @@ wxCursor::wxCursor(char **bits)
 
 bool wxCursor::CreateFromXpm(const char **bits)
 {
-    wxCHECK_MSG( bits != NULL, FALSE, wxT("invalid cursor data") )
+    wxCHECK_MSG( bits != NULL, FALSE, wxT("invalid cursor data") );
     wxXPMDecoder decoder;
     wxImage img = decoder.ReadData(bits);
-    wxCHECK_MSG( img.Ok(), FALSE, wxT("invalid cursor data") )    
+    wxCHECK_MSG( img.Ok(), FALSE, wxT("invalid cursor data") );
        CreateFromImage( img ) ;
     return TRUE;
 }
index 3fdab5fe9c29e1fbf0895e6f0a4386f43a222c9e..8c5bcd2a80bb1c17259e3cc018fd46a4320c5f76 100644 (file)
@@ -205,7 +205,7 @@ bool wxBitmap::Create(int width, int height, int depth)
 {
     UnRef();
 
-    wxCHECK_MSG( (width > 0) && (height > 0), false, wxT("invalid bitmap size") )
+    wxCHECK_MSG( (width > 0) && (height > 0), false, wxT("invalid bitmap size") );
 
     pixel_format_t pf_dummy;
     pixel_format_t *pf;
@@ -267,11 +267,11 @@ bool wxBitmap::Create(int width, int height, int depth)
 
 bool wxBitmap::CreateFromXpm(const char **bits)
 {
-    wxCHECK_MSG( bits != NULL, false, wxT("invalid bitmap data") )
+    wxCHECK_MSG( bits != NULL, false, wxT("invalid bitmap data") );
 
     wxXPMDecoder decoder;
     wxImage img = decoder.ReadData(bits);
-    wxCHECK_MSG( img.Ok(), false, wxT("invalid bitmap data") )
+    wxCHECK_MSG( img.Ok(), false, wxT("invalid bitmap data") );
 
     *this = wxBitmap(img);
 
@@ -282,7 +282,7 @@ wxBitmap::wxBitmap(const wxImage& image, int depth)
 {
     long width, height;
 
-    wxCHECK_RET( image.Ok(), wxT("invalid image") )
+    wxCHECK_RET( image.Ok(), wxT("invalid image") );
 
     width = image.GetWidth();
     height = image.GetHeight();
index 7646220beba715d51b8e66943fa1e4e3b51d7cd1..d1e489c88310f72b48ae9c47eb3de55d7fdefbdd 100644 (file)
@@ -476,11 +476,11 @@ wxBitmap::wxBitmap(const char bits[], int width, int height, int depth)
 bool wxBitmap::CreateFromXpm(const char **data)
 {
 #if wxUSE_IMAGE && wxUSE_XPM && wxUSE_WXDIB
-    wxCHECK_MSG( data != NULL, false, wxT("invalid bitmap data") )
+    wxCHECK_MSG( data != NULL, false, wxT("invalid bitmap data") );
 
     wxXPMDecoder decoder;
     wxImage img = decoder.ReadData(data);
-    wxCHECK_MSG( img.Ok(), false, wxT("invalid bitmap data") )
+    wxCHECK_MSG( img.Ok(), false, wxT("invalid bitmap data") );
 
     *this = wxBitmap(img);
     return true;
index a41c23f59cab9faf929563850eeed02d54e2f9d5..69e20420fd7eb45b3faa752169283ba79adbdca4 100644 (file)
@@ -277,7 +277,7 @@ void wxSpinButton::SetRange(int minVal, int maxVal)
 bool wxSpinButton::MSWOnScroll(int WXUNUSED(orientation), WXWORD wParam,
                                WXWORD pos, WXHWND control)
 {
-    wxCHECK_MSG( control, false, wxT("scrolling what?") )
+    wxCHECK_MSG( control, false, wxT("scrolling what?") );
 
     if ( wParam != SB_THUMBPOSITION )
     {
index 1a0cf91a8837453752022aed081e4d0233ca5540..82816207fde3a9fa45fd9ceba6750262a1ce4b7b 100644 (file)
@@ -1808,7 +1808,7 @@ void wxTreeCtrl::DoExpand(const wxTreeItemId& item, int flag)
 
     // A hidden root can be neither expanded nor collapsed.
     wxCHECK_RET( !(m_windowStyle & wxTR_HIDE_ROOT) || (HITEM(item) != TVI_ROOT),
-                 wxT("Can't expand/collapse hidden root node!") )
+                 wxT("Can't expand/collapse hidden root node!") );
 
     // TreeView_Expand doesn't send TVN_ITEMEXPAND(ING) messages, so we must
     // emulate them. This behaviour has changed slightly with comctl32.dll
@@ -2743,7 +2743,7 @@ bool wxTreeCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result)
 
                 WXWPARAM wParam = info->wVKey;
 
-                int keyCode = wxCharCodeMSWToWX(info->wVKey);
+                int keyCode = wxCharCodeMSWToWX(wParam);
                 if ( !keyCode )
                 {
                     // wxCharCodeMSWToWX() returns 0 to indicate that this is a
index 9139803c490adc1cc356d9e0fc308c86c0be9996..59451cffd2ce212bebb7acc941002c6971a1470d 100644 (file)
@@ -389,12 +389,12 @@ bool wxBitmap::CreateFromXpm(
 #if wxUSE_IMAGE && wxUSE_XPM
     Init();
 
-    wxCHECK_MSG(ppData != NULL, false, wxT("invalid bitmap data"))
+    wxCHECK_MSG(ppData != NULL, false, wxT("invalid bitmap data"));
 
     wxXPMDecoder                    vDecoder;
     wxImage                         vImg = vDecoder.ReadData(ppData);
 
-    wxCHECK_MSG(vImg.Ok(), false, wxT("invalid bitmap data"))
+    wxCHECK_MSG(vImg.Ok(), false, wxT("invalid bitmap data"));
 
     *this = wxBitmap(vImg);
     return true;
index 11315a6e1dcff15086bffb0b787a701ffb6b284c..0c25a24f01db2a2ad6aafbc6885fdea6d578abbd 100644 (file)
@@ -192,7 +192,7 @@ bool wxSpinButton::OS2OnScroll( int    WXUNUSED(nOrientation),
                                 WXWORD wPos,
                                 WXHWND hControl )
 {
-    wxCHECK_MSG(hControl, false, wxT("scrolling what?") )
+    wxCHECK_MSG(hControl, false, wxT("scrolling what?") );
 
     wxSpinEvent vEvent( wxEVT_SCROLL_THUMBTRACK, m_windowId );
     int nVal = (int)wPos;    // cast is important for negative values!
index ec2c314c4ec31366f44828c06ce143b810facfdf..bf22d84b9d5e96544df673c743c7d8cd6dc8e426 100644 (file)
@@ -312,7 +312,7 @@ bool wxBitmap::Create( int width, int height, int depth )
 {
     UnRef();
 
-    wxCHECK_MSG( (width > 0) && (height > 0), false, wxT("invalid bitmap size") )
+    wxCHECK_MSG( (width > 0) && (height > 0), false, wxT("invalid bitmap size") );
 
     m_refData = new wxBitmapRefData();
 
@@ -534,8 +534,8 @@ bool wxBitmap::CreateFromImage( const wxImage& image, int depth )
 
     UnRef();
 
-    wxCHECK_MSG( image.Ok(), false, wxT("invalid image") )
-    wxCHECK_MSG( depth == -1, false, wxT("invalid bitmap depth") )
+    wxCHECK_MSG( image.Ok(), false, wxT("invalid image") );
+    wxCHECK_MSG( depth == -1, false, wxT("invalid bitmap depth") );
 
     m_refData = new wxBitmapRefData();
 
@@ -1445,7 +1445,7 @@ bool wxXPMDataHandler::Create(wxBitmap *bitmap, void *bits,
                               int WXUNUSED(width), int WXUNUSED(height), int WXUNUSED(depth))
 {
 #if wxHAVE_LIB_XPM
-    wxCHECK_MSG( bits != NULL, false, wxT("invalid bitmap data") )
+    wxCHECK_MSG( bits != NULL, false, wxT("invalid bitmap data") );
 
     if (!bitmap->GetRefData())
         bitmap->SetRefData( new wxBitmapRefData() );