From: Arnaud Giersch Date: Mon, 23 May 2011 13:45:07 +0000 (+0200) Subject: Remove parameter "next" for constructor of sync_queue::node. X-Git-Tag: v0.1~62^2~8 X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/loba.git/commitdiff_plain/4dc6e5f4f7bab0fa256fc11a74eddbac33d80f16?ds=sidebyside Remove parameter "next" for constructor of sync_queue::node. --- diff --git a/sync_queue.h b/sync_queue.h index c2b24c3..357a72d 100644 --- a/sync_queue.h +++ b/sync_queue.h @@ -18,7 +18,7 @@ class sync_queue { public: sync_queue() { - node* n = new node(NULL, NULL); + node* n = new node(NULL); head.store(n); tail.store(n); } @@ -50,7 +50,7 @@ public: bool push(const T& val) { node* old_tail = tail.load(); - node* n = new node(val, NULL); + node* n = new node(val); old_tail->next = n; tail.store(n); return (old_tail == head.load()); @@ -72,7 +72,7 @@ public: private: struct node { - node(const T& v, node* n): value(v), next(n) { } + node(const T& v): value(v), next(NULL) { } T value; node* next; };