From 16a1e102359bd041cd624f7646afd85fb50e6d2e Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 22 May 2007 01:56:41 +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 [backport from HEAD] git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@46155 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 9bf8ed47d2..4703b1e9b5 100644 --- a/src/mac/carbon/toolbar.cpp +++ b/src/mac/carbon/toolbar.cpp @@ -1101,7 +1101,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 ) @@ -1126,7 +1126,7 @@ bool wxToolBar::Realize() #endif node = m_tools.GetFirst(); - while ( node != NULL ) + while ( node ) { tool = (wxToolBarTool*) node->GetData(); if ( tool == NULL ) @@ -1255,7 +1255,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) ) @@ -1399,7 +1399,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)