From 35f94ffd662be58153e6d8b52bcdc9edf60eabc7 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 22 May 2007 01:45:37 +0000 Subject: [PATCH] don't compare wxList::compatibility_iterator with NULL, this operation is undefined and provokes g++ warnings about using NULL in arithmetic expression git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@46154 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/mac/carbon/toolbar.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/mac/carbon/toolbar.cpp b/src/mac/carbon/toolbar.cpp index eb9d222704..1857727ebb 100644 --- a/src/mac/carbon/toolbar.cpp +++ b/src/mac/carbon/toolbar.cpp @@ -1102,7 +1102,7 @@ bool wxToolBar::Realize() // find the maximum tool width and height wxToolBarTool *tool; wxToolBarToolsList::compatibility_iterator node = m_tools.GetFirst(); - while ( node != NULL ) + while ( node ) { tool = (wxToolBarTool *) node->GetData(); if ( tool != NULL ) @@ -1129,7 +1129,7 @@ bool wxToolBar::Realize() #endif node = m_tools.GetFirst(); - while ( node != NULL ) + while ( node ) { tool = (wxToolBarTool*) node->GetData(); if ( tool == NULL ) @@ -1257,7 +1257,7 @@ bool wxToolBar::Realize() DoToggleTool( tool, true ); wxToolBarToolsList::compatibility_iterator nodePrev = node->GetPrevious(); - while ( nodePrev != NULL ) + while ( nodePrev ) { wxToolBarToolBase *toggleTool = nodePrev->GetData(); if ( (toggleTool == NULL) || !toggleTool->IsButton() || (toggleTool->GetKind() != wxITEM_RADIO) ) @@ -1401,7 +1401,7 @@ wxToolBarToolBase *wxToolBar::FindToolForPosition(wxCoord x, wxCoord y) const { wxToolBarTool *tool; wxToolBarToolsList::compatibility_iterator node = m_tools.GetFirst(); - while ( node != NULL ) + while ( node ) { tool = (wxToolBarTool *)node->GetData(); if (tool != NULL) -- 2.45.2