diff options
author | David Robillard <d@drobilla.net> | 2011-05-23 20:20:17 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2011-05-23 20:20:17 +0000 |
commit | 95aff00802baf393cbabfcb05198ffc5f9979460 (patch) | |
tree | e743d0f3c5b1179cca91ea1a63e6ac77f9ab90f2 /src/server/ConnectionImpl.cpp | |
parent | 2f86a3e8fd1e848375981ec62bbf600885b1f841 (diff) | |
download | ingen-95aff00802baf393cbabfcb05198ffc5f9979460.tar.gz ingen-95aff00802baf393cbabfcb05198ffc5f9979460.tar.bz2 ingen-95aff00802baf393cbabfcb05198ffc5f9979460.zip |
Apply patch from pgiblox in ticket #694 to fix compilation without Raul::IntrusivePtr:
"Since Raul::IntrusivePtr was removed, ingen_server no longer compiles. We could either add another #define for IntrusivePtr, or just use boost::intrusive_ptr directly. Going with the direct approach since server seems to use boost::shared_ptr directly as well."
I would like easy portability to c++0x pointers, but unfortunately there is no intrusive_ptr there... it's an easy search/replace anyway, so this will do for now.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@3307 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/server/ConnectionImpl.cpp')
-rw-r--r-- | src/server/ConnectionImpl.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/server/ConnectionImpl.cpp b/src/server/ConnectionImpl.cpp index 8da76aeb..49c45f43 100644 --- a/src/server/ConnectionImpl.cpp +++ b/src/server/ConnectionImpl.cpp @@ -16,9 +16,9 @@ */ #include <algorithm> +#include <boost/intrusive_ptr.hpp> #include "raul/log.hpp" #include "raul/Maid.hpp" -#include "raul/IntrusivePtr.hpp" #include "shared/LV2URIMap.hpp" #include "AudioBuffer.hpp" #include "BufferFactory.hpp" @@ -68,12 +68,12 @@ ConnectionImpl::dump() const void ConnectionImpl::get_sources(Context& context, uint32_t voice, - IntrusivePtr<Buffer>* srcs, uint32_t max_num_srcs, uint32_t& num_srcs) + boost::intrusive_ptr<Buffer>* srcs, uint32_t max_num_srcs, uint32_t& num_srcs) { if (must_queue() && _queue->read_space() > 0) { LV2_Atom obj; _queue->peek(sizeof(LV2_Atom), &obj); - IntrusivePtr<Buffer> buf = context.engine().buffer_factory()->get( + boost::intrusive_ptr<Buffer> buf = context.engine().buffer_factory()->get( dst_port()->buffer_type(), sizeof(LV2_Atom) + obj.size); void* data = buf->port_data(PortType::MESSAGE, context.offset()); _queue->read(sizeof(LV2_Atom) + obj.size, (LV2_Atom*)data); @@ -98,7 +98,8 @@ ConnectionImpl::queue(Context& context) if (!must_queue()) return; - IntrusivePtr<EventBuffer> src_buf = PtrCast<EventBuffer>(_src_port->buffer(0)); + boost::intrusive_ptr<EventBuffer> src_buf = + boost::dynamic_pointer_cast<EventBuffer>(_src_port->buffer(0)); if (!src_buf) { error << "Queued connection but source is not an EventBuffer" << endl; return; |