diff options
author | Josh Blum | 2013-05-27 20:13:34 -0700 |
---|---|---|
committer | Josh Blum | 2013-05-27 20:13:34 -0700 |
commit | c0aaedb595a4e04726c27c54560fd40394d0bac8 (patch) | |
tree | f7f7343f2220b1a04d87008a46b7c097fcd53d8e /include/gras/detail | |
parent | 22d99448cb680652c02464e2aa8b0c043c6ee72b (diff) | |
download | sandhi-c0aaedb595a4e04726c27c54560fd40394d0bac8.tar.gz sandhi-c0aaedb595a4e04726c27c54560fd40394d0bac8.tar.bz2 sandhi-c0aaedb595a4e04726c27c54560fd40394d0bac8.zip |
gras: simplify registration object passing
Diffstat (limited to 'include/gras/detail')
-rw-r--r-- | include/gras/detail/block.hpp | 12 |
1 files changed, 4 insertions, 8 deletions
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<PropertyRegistry> PropertyRegistrySptr; - template <typename ClassType, typename ValueType> class PropertyRegistryImpl : public PropertyRegistry { @@ -58,9 +56,8 @@ inline void Block::register_getter( ) { ClassType *obj = dynamic_cast<ClassType *>(this); - PropertyRegistrySptr pr; - pr.reset(new PropertyRegistryImpl<ClassType, ValueType>(obj, get, NULL)); - this->_register_getter(key, PMC_M(pr)); + void *pr = new PropertyRegistryImpl<ClassType, ValueType>(obj, get, NULL); + this->_register_getter(key, pr); } template <typename ClassType, typename ValueType> @@ -70,9 +67,8 @@ inline void Block::register_setter( ) { ClassType *obj = dynamic_cast<ClassType *>(this); - PropertyRegistrySptr pr; - pr.reset(new PropertyRegistryImpl<ClassType, ValueType>(obj, NULL, set)); - this->_register_setter(key, PMC_M(pr)); + void *pr = new PropertyRegistryImpl<ClassType, ValueType>(obj, NULL, set); + this->_register_setter(key, pr); } template <typename ValueType> |