[beast: 2/10] BSE: return shared_ptr from IDL methods, as mandated by newer Rapicorn
- From: Tim Janik <timj src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [beast: 2/10] BSE: return shared_ptr from IDL methods, as mandated by newer Rapicorn
- Date: Fri, 19 Jun 2015 16:22:55 +0000 (UTC)
commit 59cd7e30a9327c3ad1220e14df753ca726d32f1b
Author: Tim Janik <timj gnu org>
Date: Sun Nov 16 06:09:32 2014 +0100
BSE: return shared_ptr from IDL methods, as mandated by newer Rapicorn
bse/bseserver.cc | 6 +++---
bse/bseserver.hh | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/bse/bseserver.cc b/bse/bseserver.cc
index 232f5f5..2552078 100644
--- a/bse/bseserver.cc
+++ b/bse/bseserver.cc
@@ -1129,12 +1129,12 @@ ServerImpl::ServerImpl ()
ServerImpl::~ServerImpl ()
{}
-TestObjectIface*
+TestObjectIfaceP
ServerImpl::get_test_object ()
{
if (!test_object_)
- test_object_ = std::make_shared<TestObjectImpl>();
- return &*test_object_;
+ test_object_ = FriendAllocator<TestObjectImpl>::make_shared();
+ return test_object_;
}
ServerImpl&
diff --git a/bse/bseserver.hh b/bse/bseserver.hh
index 6ba77a2..ceb6819 100644
--- a/bse/bseserver.hh
+++ b/bse/bseserver.hh
@@ -105,7 +105,7 @@ protected:
explicit ServerImpl ();
virtual ~ServerImpl ();
public:
- virtual TestObjectIface* get_test_object ();
+ virtual TestObjectIfaceP get_test_object ();
static ServerImpl& instance ();
void send_user_message (const UserMessage &umsg);
};
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]