]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/carbon/toolbar.cpp
don't create non-existing groups in HasEntry()
[wxWidgets.git] / src / mac / carbon / toolbar.cpp
index 11fae3b2ff9f50df417110318d46062cbf035fa1..b4702c6dafb929bed83eaafd37a7fa80a9375b3f 100644 (file)
 
 #if wxUSE_TOOLBAR
 
-#include "wx/wx.h"
-#include "wx/bitmap.h"
 #include "wx/toolbar.h"
 
+#ifndef WX_PRECOMP
+    #include "wx/wx.h"
+#endif
+
 #include "wx/mac/uma.h"
 #include "wx/geometry.h"
 
@@ -907,7 +909,7 @@ bool wxToolBar::Realize()
                         if (err != noErr)
                         {
                             wxString errMsg = wxString::Format( wxT("HIToolbarRemoveItemAtIndex failed [%ld]"), (long)err );
-                            wxASSERT_MSG( 0, errMsg.c_str() );
+                            wxFAIL_MSG( errMsg.c_str() );
                         }
                     }
 
@@ -915,7 +917,7 @@ bool wxToolBar::Realize()
                     if (err != noErr)
                     {
                         wxString errMsg = wxString::Format( wxT("HIToolbarInsertItemAtIndex failed [%ld]"), (long)err );
-                        wxASSERT_MSG( 0, errMsg.c_str() );
+                        wxFAIL_MSG( errMsg.c_str() );
                     }
 
                     tool->SetIndex( currentPosition );
@@ -1265,7 +1267,7 @@ bool wxToolBar::DoInsertTool(size_t WXUNUSED(pos), wxToolBarToolBase *toolBase)
     else
     {
         wxString errMsg = wxString::Format( wxT("wxToolBar::DoInsertTool - failure [%ld]"), (long)err );
-        wxASSERT_MSG( false, errMsg.c_str() );
+        wxFAIL_MSG( errMsg.c_str() );
     }
 
     return (err == noErr);