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 /src/server/LV2Options.hpp | |
parent | c8ae7295e911c62cf9dedf90187656937cc18cbb (diff) | |
download | ingen-a3b28f2924801bd59ea7924a652247269e6af928.tar.gz ingen-a3b28f2924801bd59ea7924a652247269e6af928.tar.bz2 ingen-a3b28f2924801bd59ea7924a652247269e6af928.zip |
Reduce duplicated code
Diffstat (limited to 'src/server/LV2Options.hpp')
-rw-r--r-- | src/server/LV2Options.hpp | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/server/LV2Options.hpp b/src/server/LV2Options.hpp index e7db2553..1ef8db91 100644 --- a/src/server/LV2Options.hpp +++ b/src/server/LV2Options.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 @@ -30,11 +30,6 @@ public: : _uris(uris) {} - static void delete_feature(LV2_Feature* feature) { - free(feature->data); - free(feature); - } - void set(int32_t sample_rate, int32_t block_length, int32_t seq_size) { _sample_rate = sample_rate; _block_length = block_length; @@ -60,7 +55,7 @@ public: f->URI = LV2_OPTIONS__options; f->data = malloc(sizeof(options)); memcpy(f->data, options, sizeof(options)); - return SPtr<LV2_Feature>(f, &delete_feature); + return SPtr<LV2_Feature>(f, &free_feature); } private: |