Replaced comparisons with zero, with IsOk()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@8675 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -827,7 +827,7 @@ wxTreeItemId wxGenericDirCtrl::FindChild(wxTreeItemId parentId, const wxString&
|
|||||||
|
|
||||||
long cookie;
|
long cookie;
|
||||||
wxTreeItemId childId = m_treeCtrl->GetFirstChild(parentId, cookie);
|
wxTreeItemId childId = m_treeCtrl->GetFirstChild(parentId, cookie);
|
||||||
while (childId != 0)
|
while (childId.IsOk())
|
||||||
{
|
{
|
||||||
wxDirItemDataEx* data = (wxDirItemDataEx*) m_treeCtrl->GetItemData(childId);
|
wxDirItemDataEx* data = (wxDirItemDataEx*) m_treeCtrl->GetItemData(childId);
|
||||||
|
|
||||||
@@ -869,15 +869,15 @@ bool wxGenericDirCtrl::ExpandPath(const wxString& path)
|
|||||||
bool done = FALSE;
|
bool done = FALSE;
|
||||||
wxTreeItemId id = FindChild(m_rootId, path, done);
|
wxTreeItemId id = FindChild(m_rootId, path, done);
|
||||||
wxTreeItemId lastId = id; // The last non-zero id
|
wxTreeItemId lastId = id; // The last non-zero id
|
||||||
while ((id > 0) && !done)
|
while (id.IsOK() && !done)
|
||||||
{
|
{
|
||||||
ExpandDir(id);
|
ExpandDir(id);
|
||||||
|
|
||||||
id = FindChild(id, path, done);
|
id = FindChild(id, path, done);
|
||||||
if (id != 0)
|
if (id.IsOk())
|
||||||
lastId = id;
|
lastId = id;
|
||||||
}
|
}
|
||||||
if (lastId > 0)
|
if (lastId.IsOk())
|
||||||
{
|
{
|
||||||
wxDirItemDataEx *data = (wxDirItemDataEx *) m_treeCtrl->GetItemData(lastId);
|
wxDirItemDataEx *data = (wxDirItemDataEx *) m_treeCtrl->GetItemData(lastId);
|
||||||
if (data->m_isDir)
|
if (data->m_isDir)
|
||||||
@@ -890,7 +890,7 @@ bool wxGenericDirCtrl::ExpandPath(const wxString& path)
|
|||||||
long cookie;
|
long cookie;
|
||||||
wxTreeItemId childId = m_treeCtrl->GetFirstChild(lastId, cookie);
|
wxTreeItemId childId = m_treeCtrl->GetFirstChild(lastId, cookie);
|
||||||
bool selectedChild = FALSE;
|
bool selectedChild = FALSE;
|
||||||
while (childId != 0)
|
while (childId.IsOk())
|
||||||
{
|
{
|
||||||
wxDirItemDataEx* data = (wxDirItemDataEx*) m_treeCtrl->GetItemData(childId);
|
wxDirItemDataEx* data = (wxDirItemDataEx*) m_treeCtrl->GetItemData(childId);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user