diff options
Diffstat (limited to 'src/server/LV2Plugin.cpp')
-rw-r--r-- | src/server/LV2Plugin.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/server/LV2Plugin.cpp b/src/server/LV2Plugin.cpp index 7a43ba67..1e88952e 100644 --- a/src/server/LV2Plugin.cpp +++ b/src/server/LV2Plugin.cpp @@ -23,12 +23,13 @@ #include "ingen/Log.hpp" #include "ingen/URIs.hpp" #include "ingen/World.hpp" +#include "lilv/lilv.h" +#include "raul/Symbol.hpp" #include <cstdlib> #include <string> -namespace ingen { -namespace server { +namespace ingen::server { LV2Plugin::LV2Plugin(World& world, const LilvPlugin* lplugin) : PluginImpl(world.uris(), @@ -74,14 +75,14 @@ LV2Plugin::symbol() const } while (working.length() > 0) { - size_t last_slash = working.find_last_of('/'); + const size_t last_slash = working.find_last_of('/'); const std::string symbol = working.substr(last_slash+1); if ( (symbol[0] >= 'a' && symbol[0] <= 'z') || (symbol[0] >= 'A' && symbol[0] <= 'Z') ) { return raul::Symbol::symbolify(symbol); - } else { - working = working.substr(0, last_slash); } + + working = working.substr(0, last_slash); } return raul::Symbol("lv2_symbol"); @@ -101,9 +102,9 @@ LV2Plugin::instantiate(BufferFactory& bufs, if (!b->instantiate(bufs, state)) { delete b; return nullptr; - } else { - return b; } + + return b; } void @@ -114,7 +115,7 @@ LV2Plugin::load_presets() LilvNodes* presets = lilv_plugin_get_related(_lilv_plugin, uris.pset_Preset); if (presets) { - LILV_FOREACH(nodes, i, presets) { + LILV_FOREACH (nodes, i, presets) { const LilvNode* preset = lilv_nodes_get(presets, i); lilv_world_load_resource(lworld, preset); @@ -140,5 +141,4 @@ LV2Plugin::load_presets() PluginImpl::load_presets(); } -} // namespace server -} // namespace ingen +} // namespace ingen::server |