Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-2-2
Commits
cf79a31c
Commit
cf79a31c
authored
Aug 10, 2010
by
Erwan Tulou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
skins2: transform getNextSibling into getNextSiblingOrUncle
parent
98c1ff6e
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
10 deletions
+18
-10
modules/gui/skins2/utils/var_tree.cpp
modules/gui/skins2/utils/var_tree.cpp
+17
-9
modules/gui/skins2/utils/var_tree.hpp
modules/gui/skins2/utils/var_tree.hpp
+1
-1
No files found.
modules/gui/skins2/utils/var_tree.cpp
View file @
cf79a31c
...
@@ -111,21 +111,29 @@ VarTree::ConstIterator VarTree::operator[]( int n ) const
...
@@ -111,21 +111,29 @@ VarTree::ConstIterator VarTree::operator[]( int n ) const
return
it
;
return
it
;
}
}
VarTree
::
Iterator
VarTree
::
getNextSibling
(
VarTree
::
Iterator
current
)
VarTree
::
Iterator
VarTree
::
getNextSibling
OrUncle
(
)
{
{
VarTree
*
p_parent
=
current
->
parent
();
VarTree
*
p_parent
=
parent
();
if
(
p_parent
&&
current
!=
p_parent
->
end
()
)
if
(
p_parent
)
{
{
Iterator
it
=
current
->
parent
()
->
begin
();
Iterator
it
=
p_parent
->
begin
();
while
(
it
!=
p_parent
->
end
()
&&
it
!=
current
)
it
++
;
while
(
it
!=
p_parent
->
end
()
&&
&
(
*
it
)
!=
this
)
++
it
;
if
(
it
!=
p_parent
->
end
()
)
if
(
it
!=
p_parent
->
end
()
)
{
{
it
++
;
Iterator
current
=
it
;
++
it
;
if
(
it
!=
p_parent
->
end
()
)
return
it
;
return
it
;
else
return
current
->
next_uncle
();
}
}
return
root
()
->
end
();
else
{
msg_Err
(
getIntf
(),
"should never occur"
);
return
end
();
}
}
return
root
()
->
end
();
}
return
end
();
}
}
/* find iterator to next ancestor
/* find iterator to next ancestor
...
...
modules/gui/skins2/utils/var_tree.hpp
View file @
cf79a31c
...
@@ -105,7 +105,7 @@ public:
...
@@ -105,7 +105,7 @@ public:
VarTree
*
parent
()
{
return
m_pParent
;
}
VarTree
*
parent
()
{
return
m_pParent
;
}
/// Get next sibling
/// Get next sibling
Iterator
getNextSibling
(
Iterator
);
Iterator
getNextSibling
OrUncle
(
);
Iterator
next_uncle
();
Iterator
next_uncle
();
Iterator
prev_uncle
();
Iterator
prev_uncle
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment