spsc-queue: fix some old Relacy syntax (RL_NEW/RL_DELETE)
authorBrian Norris <banorris@uci.edu>
Tue, 6 Nov 2012 19:53:05 +0000 (11:53 -0800)
committerBrian Norris <banorris@uci.edu>
Wed, 7 Nov 2012 03:17:16 +0000 (19:17 -0800)
Relacy 2.4 doesn't even have RL_NEW and RL_DELETE, so we shouldn't use
it even if we're trying to be Relacy-compatible.

spsc-queue/queue.h

index 3167e22..c77425f 100644 (file)
@@ -9,7 +9,7 @@ class spsc_queue
 public:
        spsc_queue()
        {
-               node* n = RL_NEW node ();
+               node* n = new node ();
                head = n;
                tail = n;
        }
@@ -17,12 +17,12 @@ public:
        ~spsc_queue()
        {
                RL_ASSERT(head == tail);
-               RL_DELETE((node*)head($));
+               delete ((node*)head($));
        }
 
        void enqueue(T data)
        {
-               node* n = RL_NEW node (data);
+               node* n = new node (data);
                head($)->next.store(n, std::memory_order_release);
                head = n;
                ec.signal_relaxed();
@@ -70,7 +70,7 @@ private:
                if (0 == n)
                        return 0;
                T data = n->data($);
-               RL_DELETE(t);
+               delete (t);
                tail = n;
                return data;
        }