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
This commit is contained in:
@@ -1102,7 +1102,7 @@ bool wxToolBar::Realize()
|
|||||||
// find the maximum tool width and height
|
// find the maximum tool width and height
|
||||||
wxToolBarTool *tool;
|
wxToolBarTool *tool;
|
||||||
wxToolBarToolsList::compatibility_iterator node = m_tools.GetFirst();
|
wxToolBarToolsList::compatibility_iterator node = m_tools.GetFirst();
|
||||||
while ( node != NULL )
|
while ( node )
|
||||||
{
|
{
|
||||||
tool = (wxToolBarTool *) node->GetData();
|
tool = (wxToolBarTool *) node->GetData();
|
||||||
if ( tool != NULL )
|
if ( tool != NULL )
|
||||||
@@ -1129,7 +1129,7 @@ bool wxToolBar::Realize()
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
node = m_tools.GetFirst();
|
node = m_tools.GetFirst();
|
||||||
while ( node != NULL )
|
while ( node )
|
||||||
{
|
{
|
||||||
tool = (wxToolBarTool*) node->GetData();
|
tool = (wxToolBarTool*) node->GetData();
|
||||||
if ( tool == NULL )
|
if ( tool == NULL )
|
||||||
@@ -1257,7 +1257,7 @@ bool wxToolBar::Realize()
|
|||||||
DoToggleTool( tool, true );
|
DoToggleTool( tool, true );
|
||||||
|
|
||||||
wxToolBarToolsList::compatibility_iterator nodePrev = node->GetPrevious();
|
wxToolBarToolsList::compatibility_iterator nodePrev = node->GetPrevious();
|
||||||
while ( nodePrev != NULL )
|
while ( nodePrev )
|
||||||
{
|
{
|
||||||
wxToolBarToolBase *toggleTool = nodePrev->GetData();
|
wxToolBarToolBase *toggleTool = nodePrev->GetData();
|
||||||
if ( (toggleTool == NULL) || !toggleTool->IsButton() || (toggleTool->GetKind() != wxITEM_RADIO) )
|
if ( (toggleTool == NULL) || !toggleTool->IsButton() || (toggleTool->GetKind() != wxITEM_RADIO) )
|
||||||
@@ -1401,7 +1401,7 @@ wxToolBarToolBase *wxToolBar::FindToolForPosition(wxCoord x, wxCoord y) const
|
|||||||
{
|
{
|
||||||
wxToolBarTool *tool;
|
wxToolBarTool *tool;
|
||||||
wxToolBarToolsList::compatibility_iterator node = m_tools.GetFirst();
|
wxToolBarToolsList::compatibility_iterator node = m_tools.GetFirst();
|
||||||
while ( node != NULL )
|
while ( node )
|
||||||
{
|
{
|
||||||
tool = (wxToolBarTool *)node->GetData();
|
tool = (wxToolBarTool *)node->GetData();
|
||||||
if (tool != NULL)
|
if (tool != NULL)
|
||||||
|
Reference in New Issue
Block a user