Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(34)

Unified Diff: Source/wtf/TreeNode.h

Issue 128823002: Get rid of the overloads on templated traversal methods for clarity and safety (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/dom/StyleEngine.cpp ('k') | Source/wtf/TreeNodeTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/wtf/TreeNode.h
diff --git a/Source/wtf/TreeNode.h b/Source/wtf/TreeNode.h
index 3cf52bace0f78cade95e26dead254085d78537d4..dd03e3d2d2126cb7c3a609b6c978d1e806353554 100644
--- a/Source/wtf/TreeNode.h
+++ b/Source/wtf/TreeNode.h
@@ -159,10 +159,6 @@ inline NodeType* traverseNext(const ContainerType& current)
return 0;
}
-template<class ContainerType>
-inline ContainerType* traverseNext(const ContainerType& current)
-{ return traverseNext<ContainerType, ContainerType>(current); }
-
template<class NodeType, class ContainerType>
inline NodeType* traverseNext(const ContainerType& current, const NodeType* stayWithin)
{
@@ -182,10 +178,6 @@ inline NodeType* traverseNext(const ContainerType& current, const NodeType* stay
return 0;
}
-template<class ContainerType>
-inline ContainerType* traverseNext(const ContainerType& current, const ContainerType* stayWithin)
-{ return traverseNext<ContainerType, ContainerType>(current, stayWithin); }
-
/* non-recursive post-order traversal */
template<class NodeType, class ContainerType>
inline NodeType* traverseFirstPostOrder(const ContainerType& current)
@@ -196,10 +188,6 @@ inline NodeType* traverseFirstPostOrder(const ContainerType& current)
return first;
}
-template<class ContainerType>
-inline ContainerType* traverseFirstPostOrder(const ContainerType& current)
-{ return traverseFirstPostOrder<ContainerType, ContainerType>(current); }
-
template<class NodeType, class ContainerType>
inline NodeType* traverseNextPostOrder(const ContainerType& current)
{
@@ -211,10 +199,6 @@ inline NodeType* traverseNextPostOrder(const ContainerType& current)
return nextSibling;
}
-template<class ContainerType>
-inline ContainerType* traverseNextPostOrder(const ContainerType& current)
-{ return traverseNextPostOrder<ContainerType, ContainerType>(current); }
-
template<class NodeType, class ContainerType>
inline NodeType* traverseNextPostOrder(const ContainerType& current, const NodeType* stayWithin)
{
@@ -229,10 +213,6 @@ inline NodeType* traverseNextPostOrder(const ContainerType& current, const NodeT
return nextSibling;
}
-template<class ContainerType>
-inline ContainerType* traverseNextPostOrder(const ContainerType& current, const ContainerType* stayWithin)
-{ return traverseNextPostOrder<ContainerType, ContainerType>(current, stayWithin); }
-
/* non-recursive traversal skipping children */
template <class NodeType, class ContainerType>
inline NodeType* traverseNextSkippingChildren(const ContainerType& current)
@@ -247,10 +227,6 @@ inline NodeType* traverseNextSkippingChildren(const ContainerType& current)
return 0;
}
-template <class ContainerType>
-inline ContainerType* traverseNextSkippingChildren(const ContainerType& current)
-{ return traverseNextSkippingChildren<ContainerType, ContainerType>(current); }
-
template <class NodeType, class ContainerType>
inline NodeType* traverseNextSkippingChildren(const ContainerType& current, const NodeType* stayWithin)
{
@@ -268,10 +244,6 @@ inline NodeType* traverseNextSkippingChildren(const ContainerType& current, cons
return 0;
}
-template <class ContainerType>
-inline ContainerType* traverseNextSkippingChildren(const ContainerType& current, const ContainerType* stayWithin)
-{ return traverseNextSkippingChildren<ContainerType, ContainerType>(current, stayWithin); }
-
} // namespace WTF
using WTF::TreeNode;
« no previous file with comments | « Source/core/dom/StyleEngine.cpp ('k') | Source/wtf/TreeNodeTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698