X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/loba.git/blobdiff_plain/72cb21403f86fbb162c8e4555f27234d337b6b6a..HEAD:/sync_queue.h?ds=inline diff --git a/sync_queue.h b/sync_queue.h index c3f29e5..55d2e79 100644 --- a/sync_queue.h +++ b/sync_queue.h @@ -1,17 +1,7 @@ #ifndef SYNC_QUEUE_H #define SYNC_QUEUE_H -#if __GNUC__ == 4 && __GNUC_MINOR__ == 4 -# include // is named in gcc 4.4 - -template // fix missing definition in gcc 4.4 -void -atomic<_Tp*>::store(_Tp* __v, memory_order __m) volatile -{ atomic_address::store(__v, __m); } - -#else -# include -#endif +#include #define SYNC_QUEUE_BUFSIZE 16 @@ -28,7 +18,7 @@ public: ~sync_queue() { node* n = head_node; - while (n != NULL) { + while (n != nullptr) { node* prev = n; n = n->next; delete prev; @@ -94,7 +84,7 @@ public: private: struct node { - node(): next(NULL) { } + node(): next(nullptr) { } T values[SYNC_QUEUE_BUFSIZE]; node* next; };