From 8aa0908635f255e2d533539d5330b92b62dc88ba Mon Sep 17 00:00:00 2001 From: Martin Sustrik Date: Tue, 15 Dec 2009 23:49:55 +0100 Subject: all news converted to nothrow variant --- src/yqueue.hpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/yqueue.hpp') 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 #include #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; -- cgit v1.2.3