summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2022-08-18 01:22:18 -0400
committerDavid Robillard <d@drobilla.net>2022-08-18 01:22:18 -0400
commit3af246bb3291d8568f6d110884fa55ee5fd20221 (patch)
tree434ac316050356e4db379ba8305b75285b17bbba /include
parent44381dbda9dbf8d20894789fe8e3ea941b70a1d0 (diff)
downloadingen-3af246bb3291d8568f6d110884fa55ee5fd20221.tar.gz
ingen-3af246bb3291d8568f6d110884fa55ee5fd20221.tar.bz2
ingen-3af246bb3291d8568f6d110884fa55ee5fd20221.zip
Avoid "else" after "return", "break", and "continue"
Diffstat (limited to 'include')
-rw-r--r--include/ingen/Atom.hpp8
-rw-r--r--include/ingen/Resource.hpp5
-rw-r--r--include/ingen/URIs.hpp5
-rw-r--r--include/ingen/paths.hpp6
4 files changed, 15 insertions, 9 deletions
diff --git a/include/ingen/Atom.hpp b/include/ingen/Atom.hpp
index 3fb8f091..9c19a741 100644
--- a/include/ingen/Atom.hpp
+++ b/include/ingen/Atom.hpp
@@ -125,11 +125,11 @@ public:
inline bool set_rt(const Atom& other) {
if (is_reference()) {
return false;
- } else {
- _atom = other._atom;
- _body.val = other._body.val;
- return true;
}
+
+ _atom = other._atom;
+ _body.val = other._body.val;
+ return true;
}
inline uint32_t size() const { return _atom.size; }
diff --git a/include/ingen/Resource.hpp b/include/ingen/Resource.hpp
index 577e8cc0..8b96a27b 100644
--- a/include/ingen/Resource.hpp
+++ b/include/ingen/Resource.hpp
@@ -69,9 +69,12 @@ public:
static Graph uri_to_graph(const URI& uri) {
if (uri == INGEN_NS "externalContext") {
return Graph::EXTERNAL;
- } else if (uri == INGEN_NS "internalContext") {
+ }
+
+ if (uri == INGEN_NS "internalContext") {
return Graph::INTERNAL;
}
+
return Graph::DEFAULT;
}
diff --git a/include/ingen/URIs.hpp b/include/ingen/URIs.hpp
index cfa00f73..c6bd6968 100644
--- a/include/ingen/URIs.hpp
+++ b/include/ingen/URIs.hpp
@@ -212,9 +212,12 @@ operator==(const URIs::Quark& lhs, const Atom& rhs)
{
if (rhs.type() == lhs.urid_atom().type()) {
return rhs == lhs.urid_atom();
- } else if (rhs.type() == lhs.uri_atom().type()) {
+ }
+
+ if (rhs.type() == lhs.uri_atom().type()) {
return rhs == lhs.uri_atom();
}
+
return false;
}
diff --git a/include/ingen/paths.hpp b/include/ingen/paths.hpp
index fefdf364..ad079390 100644
--- a/include/ingen/paths.hpp
+++ b/include/ingen/paths.hpp
@@ -32,10 +32,10 @@ inline bool uri_is_path(const URI& uri)
const size_t root_len = main_uri().string().length();
if (uri == main_uri()) {
return true;
- } else {
- return uri.string().substr(0, root_len + 1) ==
- main_uri().string() + "/";
}
+
+ return uri.string().substr(0, root_len + 1) ==
+ main_uri().string() + "/";
}
inline raul::Path uri_to_path(const URI& uri)