diff options
-rw-r--r-- | lib/block_props.cpp | 11 | ||||
-rw-r--r-- | lib/gras_impl/block_actor.hpp | 1 |
2 files changed, 6 insertions, 6 deletions
diff --git a/lib/block_props.cpp b/lib/block_props.cpp index 99edce7..5965085 100644 --- a/lib/block_props.cpp +++ b/lib/block_props.cpp @@ -64,15 +64,16 @@ struct PropAccessReceiver : Theron::Receiver /*********************************************************************** * Handle the get and set calls from the user's call-stack **********************************************************************/ -PMCC BlockActor::prop_access_dispatcher(const std::string &key, const PMCC &value, const bool set) +template <typename ActorType> +static PMCC prop_access_dispatcher(ActorType &actor, const std::string &key, const PMCC &value, const bool set) { PropAccessReceiver receiver; PropAccessMessage message; message.set = set; message.key = key; message.value = value; - this->Push(message, receiver.GetAddress()); - this->highPrioPreNotify(); + actor->Push(message, receiver.GetAddress()); + actor->highPrioPreNotify(); receiver.Wait(); if (not receiver.message.error.empty()) { @@ -88,10 +89,10 @@ void Block::_register_property(const std::string &key, PropertyRegistrySptr pr) void Block::_set_property(const std::string &key, const PMCC &value) { - (*this)->block->prop_access_dispatcher(key, value, true); + prop_access_dispatcher((*this)->block, key, value, true); } PMCC Block::_get_property(const std::string &key) { - return (*this)->block->prop_access_dispatcher(key, PMCC(), false); + return prop_access_dispatcher((*this)->block, key, PMCC(), false); } diff --git a/lib/gras_impl/block_actor.hpp b/lib/gras_impl/block_actor.hpp index 8efc388..89b8230 100644 --- a/lib/gras_impl/block_actor.hpp +++ b/lib/gras_impl/block_actor.hpp @@ -197,7 +197,6 @@ struct BlockActor : Apology::Worker std::vector<std::vector<OutputHintMessage> > output_allocation_hints; //property stuff - PMCC prop_access_dispatcher(const std::string &key, const PMCC &value, const bool set); std::map<std::string, PropertyRegistrySptr> prop_registry; BlockStats stats; |