From 3af246bb3291d8568f6d110884fa55ee5fd20221 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Thu, 18 Aug 2022 01:22:18 -0400 Subject: Avoid "else" after "return", "break", and "continue" --- src/Parser.cpp | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'src/Parser.cpp') diff --git a/src/Parser.cpp b/src/Parser.cpp index f853d1b5..a1661625 100644 --- a/src/Parser.cpp +++ b/src/Parser.cpp @@ -450,7 +450,9 @@ parse_arc(ingen::World& world, if (t.end()) { world.log().error("Arc has no tail\n"); return false; - } else if (h.end()) { + } + + if (h.end()) { world.log().error("Arc has no head\n"); return false; } @@ -472,7 +474,9 @@ parse_arc(ingen::World& world, if (!(++t).end()) { world.log().error("Arc has multiple tails\n"); return false; - } else if (!(++h).end()) { + } + + if (!(++h).end()) { world.log().error("Arc has multiple heads\n"); return false; } @@ -660,10 +664,10 @@ Parser::parse_file(ingen::World& world, URI(INGEN__file), world.forge().alloc_uri(uri.string())); return true; - } else { - world.log().warn("Document URI lost\n"); - return false; } + + world.log().warn("Document URI lost\n"); + return false; } boost::optional -- cgit v1.2.1