diff options
author | David Robillard <d@drobilla.net> | 2022-08-18 01:22:18 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2022-08-18 01:22:18 -0400 |
commit | 3af246bb3291d8568f6d110884fa55ee5fd20221 (patch) | |
tree | 434ac316050356e4db379ba8305b75285b17bbba /src/client/PluginModel.cpp | |
parent | 44381dbda9dbf8d20894789fe8e3ea941b70a1d0 (diff) | |
download | ingen-3af246bb3291d8568f6d110884fa55ee5fd20221.tar.gz ingen-3af246bb3291d8568f6d110884fa55ee5fd20221.tar.bz2 ingen-3af246bb3291d8568f6d110884fa55ee5fd20221.zip |
Avoid "else" after "return", "break", and "continue"
Diffstat (limited to 'src/client/PluginModel.cpp')
-rw-r--r-- | src/client/PluginModel.cpp | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/src/client/PluginModel.cpp b/src/client/PluginModel.cpp index a6784928..6ba989b9 100644 --- a/src/client/PluginModel.cpp +++ b/src/client/PluginModel.cpp @@ -125,15 +125,21 @@ PluginModel::get_property(const URI& key) const ret = set_property( key, _uris.forge.make_urid(URI(lilv_node_as_uri(value)))); break; - } else if (lilv_node_is_string(value)) { + } + + if (lilv_node_is_string(value)) { ret = set_property( key, _uris.forge.alloc(lilv_node_as_string(value))); break; - } else if (lilv_node_is_float(value)) { + } + + if (lilv_node_is_float(value)) { ret = set_property( key, _uris.forge.make(lilv_node_as_float(value))); break; - } else if (lilv_node_is_int(value)) { + } + + if (lilv_node_is_int(value)) { ret = set_property( key, _uris.forge.make(lilv_node_as_int(value))); break; @@ -179,9 +185,9 @@ PluginModel::default_block_symbol() const const Atom& name_atom = get_property(_uris.lv2_symbol); if (name_atom.is_valid() && name_atom.type() == _uris.forge.String) { return raul::Symbol::symbolify(name_atom.ptr<char>()); - } else { - return raul::Symbol("_"); } + + return raul::Symbol("_"); } string @@ -190,9 +196,9 @@ PluginModel::human_name() const const Atom& name_atom = get_property(_uris.doap_name); if (name_atom.type() == _uris.forge.String) { return name_atom.ptr<char>(); - } else { - return default_block_symbol().c_str(); } + + return default_block_symbol().c_str(); } string @@ -255,9 +261,9 @@ heading(const std::string& text, bool html, unsigned level) if (html) { const std::string tag = std::string("h") + std::to_string(level); return std::string("<") + tag + ">" + text + "</" + tag + ">\n"; - } else { - return text + ":\n\n"; } + + return text + ":\n\n"; } static std::string @@ -265,9 +271,9 @@ link(const std::string& addr, bool html) { if (html) { return std::string("<a href=\"") + addr + "\">" + addr + "</a>"; - } else { - return addr; } + + return addr; } std::string |