diff options
Diffstat (limited to 'src/server/LV2Plugin.cpp')
-rw-r--r-- | src/server/LV2Plugin.cpp | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/src/server/LV2Plugin.cpp b/src/server/LV2Plugin.cpp index 25ae9294..87072ab0 100644 --- a/src/server/LV2Plugin.cpp +++ b/src/server/LV2Plugin.cpp @@ -19,10 +19,13 @@ #include "Engine.hpp" #include "LV2Block.hpp" -#include "ingen/Forge.hpp" -#include "ingen/Log.hpp" -#include "ingen/URIs.hpp" -#include "ingen/World.hpp" +#include <ingen/Forge.hpp> +#include <ingen/Log.hpp> +#include <ingen/URI.hpp> +#include <ingen/URIs.hpp> +#include <ingen/World.hpp> +#include <lilv/lilv.h> +#include <raul/Symbol.hpp> #include <cstdlib> #include <string> @@ -69,18 +72,18 @@ LV2Plugin::symbol() const { std::string working = uri(); if (working.back() == '/') { - working = working.substr(0, working.length() - 1); + working.resize(working.length() - 1); } - while (working.length() > 0) { - size_t last_slash = working.find_last_of('/'); + while (!working.empty()) { + 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); } - working = working.substr(0, last_slash); + working.resize(last_slash); } return raul::Symbol("lv2_symbol"); |