From 8d532e006d85a1b0c59a6e1fdab0033ff163931e Mon Sep 17 00:00:00 2001 From: Kevin Day Date: Sun, 12 Dec 2021 21:55:19 -0600 Subject: [PATCH] Cleanup: If/else nesting when previous if calls return. --- level_1/fl_string/c/string.c | 36 ++++++++++++++++++++++++------------ 1 file changed, 24 insertions(+), 12 deletions(-) diff --git a/level_1/fl_string/c/string.c b/level_1/fl_string/c/string.c index 3d419ce..1a2081b 100644 --- a/level_1/fl_string/c/string.c +++ b/level_1/fl_string/c/string.c @@ -91,7 +91,8 @@ extern "C" { return F_equal_to_not; } - else if (!string2.used || range2.start > range2.stop) { + + if (!string2.used || range2.start > range2.stop) { return F_equal_to_not; } @@ -112,7 +113,8 @@ extern "C" { return F_equal_to_not; } - else if (!string2.used || range2.start > range2.stop) { + + if (!string2.used || range2.start > range2.stop) { return F_equal_to_not; } @@ -133,7 +135,8 @@ extern "C" { return F_equal_to_not; } - else if (!string2.used || range2.start > range2.stop) { + + if (!string2.used || range2.start > range2.stop) { return F_equal_to_not; } @@ -155,7 +158,8 @@ extern "C" { return F_equal_to_not; } - else if (!string2.used || range2.start > range2.stop) { + + if (!string2.used || range2.start > range2.stop) { return F_equal_to_not; } @@ -176,7 +180,8 @@ extern "C" { return F_equal_to_not; } - else if (!string2.used || range2.start > range2.stop) { + + if (!string2.used || range2.start > range2.stop) { return F_equal_to_not; } @@ -197,7 +202,8 @@ extern "C" { return F_equal_to_not; } - else if (!string2.used || range2.start > range2.stop) { + + if (!string2.used || range2.start > range2.stop) { return F_equal_to_not; } @@ -219,7 +225,8 @@ extern "C" { return F_equal_to_not; } - else if (!string2.used || range2.start > range2.stop) { + + if (!string2.used || range2.start > range2.stop) { return F_equal_to_not; } @@ -240,7 +247,8 @@ extern "C" { return F_equal_to_not; } - else if (!string2.used || range2.start > range2.stop) { + + if (!string2.used || range2.start > range2.stop) { return F_equal_to_not; } @@ -261,7 +269,8 @@ extern "C" { return F_equal_to_not; } - else if (!string2.used || range2.start > range2.stop) { + + if (!string2.used || range2.start > range2.stop) { return F_equal_to_not; } @@ -283,7 +292,8 @@ extern "C" { return F_equal_to_not; } - else if (!string2.used || range2.start > range2.stop) { + + if (!string2.used || range2.start > range2.stop) { return F_equal_to_not; } @@ -304,7 +314,8 @@ extern "C" { return F_equal_to_not; } - else if (!string2.used || range2.start > range2.stop) { + + if (!string2.used || range2.start > range2.stop) { return F_equal_to_not; } @@ -325,7 +336,8 @@ extern "C" { return F_equal_to_not; } - else if (!string2.used || range2.start > range2.stop) { + + if (!string2.used || range2.start > range2.stop) { return F_equal_to_not; } -- 1.8.3.1