summaryrefslogtreecommitdiff
path: root/src/yqueue.hpp
diff options
context:
space:
mode:
authorMartin Sustrik <sustrik@fastmq.commkdir>2009-12-15 23:49:55 +0100
committerMartin Sustrik <sustrik@fastmq.commkdir>2009-12-15 23:49:55 +0100
commit8aa0908635f255e2d533539d5330b92b62dc88ba (patch)
treef72f8dc99463cb0e56213dbde735ed585986cbfb /src/yqueue.hpp
parent2cef05d86976784f4bc1083cb0fa548e267ac132 (diff)
all news converted to nothrow variant
Diffstat (limited to 'src/yqueue.hpp')
-rw-r--r--src/yqueue.hpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/yqueue.hpp b/src/yqueue.hpp
index f80af9c..1d3f8e8 100644
--- a/src/yqueue.hpp
+++ b/src/yqueue.hpp
@@ -20,6 +20,7 @@
#ifndef __ZMQ_YQUEUE_HPP_INCLUDED__
#define __ZMQ_YQUEUE_HPP_INCLUDED__
+#include <new>
#include <stddef.h>
#include "err.hpp"
@@ -47,7 +48,7 @@ namespace zmq
// Create the queue.
inline yqueue_t ()
{
- begin_chunk = new chunk_t;
+ begin_chunk = new (std::nothrow) chunk_t;
zmq_assert (begin_chunk);
begin_pos = 0;
back_chunk = NULL;
@@ -93,7 +94,7 @@ namespace zmq
if (++end_pos != N)
return;
- end_chunk->next = new chunk_t;
+ end_chunk->next = new (std::nothrow) chunk_t;
zmq_assert (end_chunk->next);
end_chunk = end_chunk->next;
end_pos = 0;