Completed cmdNew implementation.
This commit is contained in:
@@ -180,16 +180,14 @@ namespace znode
|
||||
|
||||
zshared_node sibling()
|
||||
{
|
||||
if( !parent() )
|
||||
//return zshared_node( make_node("WTF1") );
|
||||
return zshared_node();
|
||||
if( parent() )
|
||||
{
|
||||
znode_list& childs = _parent->_children;
|
||||
auto it = std::find( childs.begin(), childs.end(), this->shared_from_this() );
|
||||
if( ++it != childs.end())
|
||||
return *(it);
|
||||
}
|
||||
|
||||
znode_list& childs = _parent->_children;
|
||||
auto it = std::find( childs.begin(), childs.end(), this->shared_from_this() );
|
||||
if( ++it != childs.end())
|
||||
return *(it);
|
||||
|
||||
//return zshared_node( make_node("WTF?") );
|
||||
return zshared_node();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user