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

Unified Diff: base/linked_list.h

Issue 522020: clang support (Closed)
Patch Set: lgtm Created 10 years, 3 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 | « no previous file | build/common.gypi » ('j') | chrome/browser/zygote_main_linux.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/linked_list.h
diff --git a/base/linked_list.h b/base/linked_list.h
index 0626025a75196f299561bee18dd0b5e61f532344..39651ad94fc19ed7c8dc5bcc850ec69aec2b790a 100644
--- a/base/linked_list.h
+++ b/base/linked_list.h
@@ -126,6 +126,12 @@ class LinkNode {
return static_cast<T*>(this);
}
+ // Work around bug reported upstream:
+ // http://llvm.org/bugs/show_bug.cgi?id=7974
+ void set(LinkNode<T>* prev, LinkNode<T>* next) {
+ previous_ = prev; next_ = next;
hans 2010/09/20 08:11:49 Nit: two statements on a single row like this is q
+ }
+
private:
LinkNode<T>* previous_;
LinkNode<T>* next_;
@@ -137,7 +143,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) {
« no previous file with comments | « no previous file | build/common.gypi » ('j') | chrome/browser/zygote_main_linux.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698