From 3a6162627155ec48244c5870729c67fd201e6d6f Mon Sep 17 00:00:00 2001 From: p0358 Date: Fri, 20 Jan 2023 17:24:03 +0100 Subject: Pedantic fix for #391 (use if-else instead of if) (#392) Pedantic fix for previous commit (3cfd6f9) (use if-else instead of if) --- NorthstarDLL/util/utils.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/NorthstarDLL/util/utils.cpp b/NorthstarDLL/util/utils.cpp index 10c5b26d..a3b31e17 100644 --- a/NorthstarDLL/util/utils.cpp +++ b/NorthstarDLL/util/utils.cpp @@ -29,13 +29,13 @@ void NS::Utils::RemoveAsciiControlSequences(char* str, bool allow_color_codes) int bytesToSkip = 0; if ((c & 0xE0) == 0xC0) bytesToSkip = 1; // skip 2-byte UTF-8 sequence - if ((c & 0xF0) == 0xE0) + else if ((c & 0xF0) == 0xE0) bytesToSkip = 2; // skip 3-byte UTF-8 sequence - if ((c & 0xF8) == 0xF0) + else if ((c & 0xF8) == 0xF0) bytesToSkip = 3; // skip 4-byte UTF-8 sequence - if ((c & 0xFC) == 0xF8) + else if ((c & 0xFC) == 0xF8) bytesToSkip = 4; // skip 5-byte UTF-8 sequence - if ((c & 0xFE) == 0xFC) + else if ((c & 0xFE) == 0xFC) bytesToSkip = 5; // skip 6-byte UTF-8 sequence bool invalid = false; -- cgit v1.2.3