From dd79366789a749856de0e41633146340c2b79f9a Mon Sep 17 00:00:00 2001 From: Alan Conway Date: Fri, 1 May 2009 14:53:05 +0000 Subject: Cleaned up PIMPL pattern for public API - Separated PrivateImplRef helper classs from Handler base class. - Consistent impl of ctor, dtor, copy, assign for all PIMPL classes. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@770702 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/qpid/client/LocalQueue.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'cpp/src/qpid/client/LocalQueue.cpp') diff --git a/cpp/src/qpid/client/LocalQueue.cpp b/cpp/src/qpid/client/LocalQueue.cpp index 02fecf804f..dfd8405a7f 100644 --- a/cpp/src/qpid/client/LocalQueue.cpp +++ b/cpp/src/qpid/client/LocalQueue.cpp @@ -24,7 +24,7 @@ #include "qpid/framing/FrameSet.h" #include "qpid/framing/MessageTransferBody.h" #include "qpid/framing/reply_exceptions.h" -#include "HandlePrivate.h" +#include "PrivateImplRef.h" #include "SubscriptionImpl.h" #include "CompletionImpl.h" @@ -52,8 +52,9 @@ bool LocalQueue::get(Message& result, sys::Duration timeout) { bool ok = queue->pop(content, timeout); if (!ok) return false; if (content->isA()) { - result = Message(new MessageImpl(*content)); - boost::intrusive_ptr si = HandlePrivate::get(subscription); + + *MessageImpl::get(result) = MessageImpl(*content); + boost::intrusive_ptr si = PrivateImplRef::get(subscription); assert(si); if (si) si->received(result); return true; -- cgit v1.2.1