X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/loba.git/blobdiff_plain/c87e01d1a48d08773380367ef6c547a38a019061..4dc6e5f4f7bab0fa256fc11a74eddbac33d80f16:/sync_queue.h?ds=inline 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; };