From f249d6b60cb3268bb4f70468657f5eefef7add0f Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 12 Feb 2017 15:36:13 +0100 Subject: Update for latest Raul --- src/engine/Action.hpp | 2 +- src/engine/LearnRequest.cpp | 6 +----- src/engine/LearnRequest.hpp | 2 +- src/engine/Updates.cpp | 1 + src/engine/machina/Updates.hpp | 1 + src/engine/machina/types.hpp | 6 +++++- 6 files changed, 10 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/engine/Action.hpp b/src/engine/Action.hpp index 90f8664..2916099 100644 --- a/src/engine/Action.hpp +++ b/src/engine/Action.hpp @@ -33,7 +33,7 @@ namespace machina { /** An Action, executed on entering or exiting of a state. */ struct Action - : public Raul::Maid::Manageable + : public Raul::Maid::Disposable , public Stateful { bool operator==(const Action& rhs) const { return false; } diff --git a/src/engine/LearnRequest.cpp b/src/engine/LearnRequest.cpp index 9ad8422..5756dd1 100644 --- a/src/engine/LearnRequest.cpp +++ b/src/engine/LearnRequest.cpp @@ -27,16 +27,12 @@ LearnRequest::LearnRequest(SPtr maid, SPtr node) , _enter_action(new MidiAction(4, NULL)) , _exit_action(new MidiAction(4, NULL)) { - maid->manage(_enter_action); - maid->manage(_exit_action); } SPtr LearnRequest::create(SPtr maid, SPtr node) { - SPtr ret(new LearnRequest(maid, node)); - maid->manage(ret); - return ret; + return SPtr(new LearnRequest(maid, node)); } void diff --git a/src/engine/LearnRequest.hpp b/src/engine/LearnRequest.hpp index 685b140..9cdfc3c 100644 --- a/src/engine/LearnRequest.hpp +++ b/src/engine/LearnRequest.hpp @@ -31,7 +31,7 @@ class MidiAction; /** A request to MIDI learn a certain node. */ -class LearnRequest : public Raul::Maid::Manageable +class LearnRequest : public Raul::Maid::Disposable { public: static SPtr create(SPtr maid, SPtr node); diff --git a/src/engine/Updates.cpp b/src/engine/Updates.cpp index 846bf8d..ce655e4 100644 --- a/src/engine/Updates.cpp +++ b/src/engine/Updates.cpp @@ -19,6 +19,7 @@ #include "machina/Atom.hpp" #include "machina/Updates.hpp" #include "machina/types.hpp" +#include "raul/RingBuffer.hpp" namespace machina { diff --git a/src/engine/machina/Updates.hpp b/src/engine/machina/Updates.hpp index 7c0391b..ff09af9 100644 --- a/src/engine/machina/Updates.hpp +++ b/src/engine/machina/Updates.hpp @@ -21,6 +21,7 @@ #include "machina/Atom.hpp" #include "machina/types.hpp" +#include "raul/RingBuffer.hpp" namespace machina { diff --git a/src/engine/machina/types.hpp b/src/engine/machina/types.hpp index e9ac7d0..61137b7 100644 --- a/src/engine/machina/types.hpp +++ b/src/engine/machina/types.hpp @@ -20,7 +20,7 @@ #include #include -#include "raul/RingBuffer.hpp" +#include "raul/Maid.hpp" namespace machina { @@ -37,9 +37,13 @@ using SPtr = std::shared_ptr; template using WPtr = std::weak_ptr; + +template +using MPtr = Raul::managed_ptr; #else #define SPtr std::shared_ptr #define WPtr std::weak_ptr +#define MPtr Raul::managed_ptr #endif template -- cgit v1.2.1