[clang-tidy] do not use return after else (#892)

Found with readability-else-after-return

Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
Rosen Penev
2020-06-15 13:09:29 -07:00
committed by GitHub
parent 4dbfeb0bbc
commit a808c1f44a
5 changed files with 22 additions and 22 deletions

View File

@@ -350,7 +350,9 @@ void Stream::StreamInUtf16() const {
// Trailing (low) surrogate...ugh, wrong order
QueueUnicodeCodepoint(m_readahead, CP_REPLACEMENT_CHARACTER);
return;
} else if (ch >= 0xD800 && ch < 0xDC00) {
}
if (ch >= 0xD800 && ch < 0xDC00) {
// ch is a leading (high) surrogate
// Four byte UTF-8 code point
@@ -375,11 +377,10 @@ void Stream::StreamInUtf16() const {
// Easiest case: queue the codepoint and return
QueueUnicodeCodepoint(m_readahead, ch);
return;
} else {
// Start the loop over with the new high surrogate
ch = chLow;
continue;
}
// Start the loop over with the new high surrogate
ch = chLow;
continue;
}
// Select the payload bits from the high surrogate