diff options
author | David Robillard <d@drobilla.net> | 2016-07-31 22:50:51 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2016-07-31 22:50:51 -0400 |
commit | a3b28f2924801bd59ea7924a652247269e6af928 (patch) | |
tree | c9ff4aa5302ab83eefe4cfb873a02deeca62a861 /ingen | |
parent | c8ae7295e911c62cf9dedf90187656937cc18cbb (diff) | |
download | ingen-a3b28f2924801bd59ea7924a652247269e6af928.tar.gz ingen-a3b28f2924801bd59ea7924a652247269e6af928.tar.bz2 ingen-a3b28f2924801bd59ea7924a652247269e6af928.zip |
Reduce duplicated code
Diffstat (limited to 'ingen')
-rw-r--r-- | ingen/LV2Features.hpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/ingen/LV2Features.hpp b/ingen/LV2Features.hpp index 0bc3947b..2fe71f11 100644 --- a/ingen/LV2Features.hpp +++ b/ingen/LV2Features.hpp @@ -1,6 +1,6 @@ /* This file is part of Ingen. - Copyright 2007-2015 David Robillard <http://drobilla.net/> + Copyright 2007-2016 David Robillard <http://drobilla.net/> Ingen is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free @@ -45,6 +45,12 @@ public: virtual SPtr<LV2_Feature> feature(World* world, Node* block) = 0; + +protected: + static void free_feature(LV2_Feature* feature) { + free(feature->data); + free(feature); + } }; class EmptyFeature : public Feature { |