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
This commit is contained in:
@@ -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)
|
||||
|
Reference in New Issue
Block a user