summaryrefslogtreecommitdiffstats
path: root/base/linked_list.h
diff options
context:
space:
mode:
authorthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-16 18:25:37 +0000
committerthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-16 18:25:37 +0000
commitc21e0e82db0a3e9a60940f7ceea74edb5a1c4122 (patch)
tree1bf0d8d3ab7e2adab9893158a8be1f8638698e62 /base/linked_list.h
parenta3cd502bb5891548171a4bb17fe1ce351cd45ba7 (diff)
downloadchromium_src-c21e0e82db0a3e9a60940f7ceea74edb5a1c4122.zip
chromium_src-c21e0e82db0a3e9a60940f7ceea74edb5a1c4122.tar.gz
chromium_src-c21e0e82db0a3e9a60940f7ceea74edb5a1c4122.tar.bz2
patch
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49982 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/linked_list.h')
-rw-r--r--base/linked_list.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/base/linked_list.h b/base/linked_list.h
index 5b5184f..7464997 100644
--- a/base/linked_list.h
+++ b/base/linked_list.h
@@ -125,6 +125,10 @@ class LinkNode {
return static_cast<T*>(this);
}
+ void set(LinkNode<T>* prev, LinkNode<T>* next) {
+ previous_ = prev; next_ = next;
+ }
+
private:
LinkNode<T>* previous_;
LinkNode<T>* next_;
@@ -136,7 +140,7 @@ class LinkedList {
// The "root" node is self-referential, and forms the basis of a circular
// list (root_.next() will point back to the start of the list,
// and root_->previous() wraps around to the end of the list).
- LinkedList() : root_(&root_, &root_) {}
+ LinkedList() { root_.set(&root_, &root_); }
// Appends |e| to the end of the linked list.
void Append(LinkNode<T>* e) {