From 53ccf1c0ba8dca297ae50709af4520a7f34b7551 Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Fri, 3 Nov 2000 18:02:03 +0000 Subject: [PATCH] Replaced comparisons with zero, with IsOk() git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@8675 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/generic/dirctrlg.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/generic/dirctrlg.cpp b/src/generic/dirctrlg.cpp index 5ea3910aee..04542809fd 100644 --- a/src/generic/dirctrlg.cpp +++ b/src/generic/dirctrlg.cpp @@ -827,7 +827,7 @@ wxTreeItemId wxGenericDirCtrl::FindChild(wxTreeItemId parentId, const wxString& long cookie; wxTreeItemId childId = m_treeCtrl->GetFirstChild(parentId, cookie); - while (childId != 0) + while (childId.IsOk()) { wxDirItemDataEx* data = (wxDirItemDataEx*) m_treeCtrl->GetItemData(childId); @@ -869,15 +869,15 @@ bool wxGenericDirCtrl::ExpandPath(const wxString& path) bool done = FALSE; wxTreeItemId id = FindChild(m_rootId, path, done); wxTreeItemId lastId = id; // The last non-zero id - while ((id > 0) && !done) + while (id.IsOK() && !done) { ExpandDir(id); id = FindChild(id, path, done); - if (id != 0) + if (id.IsOk()) lastId = id; } - if (lastId > 0) + if (lastId.IsOk()) { wxDirItemDataEx *data = (wxDirItemDataEx *) m_treeCtrl->GetItemData(lastId); if (data->m_isDir) @@ -890,7 +890,7 @@ bool wxGenericDirCtrl::ExpandPath(const wxString& path) long cookie; wxTreeItemId childId = m_treeCtrl->GetFirstChild(lastId, cookie); bool selectedChild = FALSE; - while (childId != 0) + while (childId.IsOk()) { wxDirItemDataEx* data = (wxDirItemDataEx*) m_treeCtrl->GetItemData(childId); -- 2.47.2