From c0aaedb595a4e04726c27c54560fd40394d0bac8 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Mon, 27 May 2013 20:13:34 -0700 Subject: gras: simplify registration object passing --- include/gras/detail/block.hpp | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'include/gras/detail') diff --git a/include/gras/detail/block.hpp b/include/gras/detail/block.hpp index 630117d..ac9a669 100644 --- a/include/gras/detail/block.hpp +++ b/include/gras/detail/block.hpp @@ -14,8 +14,6 @@ struct GRAS_API PropertyRegistry virtual PMCC get(void) = 0; }; -typedef boost::shared_ptr PropertyRegistrySptr; - template class PropertyRegistryImpl : public PropertyRegistry { @@ -58,9 +56,8 @@ inline void Block::register_getter( ) { ClassType *obj = dynamic_cast(this); - PropertyRegistrySptr pr; - pr.reset(new PropertyRegistryImpl(obj, get, NULL)); - this->_register_getter(key, PMC_M(pr)); + void *pr = new PropertyRegistryImpl(obj, get, NULL); + this->_register_getter(key, pr); } template @@ -70,9 +67,8 @@ inline void Block::register_setter( ) { ClassType *obj = dynamic_cast(this); - PropertyRegistrySptr pr; - pr.reset(new PropertyRegistryImpl(obj, NULL, set)); - this->_register_setter(key, PMC_M(pr)); + void *pr = new PropertyRegistryImpl(obj, NULL, set); + this->_register_setter(key, pr); } template -- cgit