Skip to content

Commit 135bc2e

Browse files
committed
fixed readability-else-after-return clang-tidy warnings
1 parent 143df41 commit 135bc2e

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

lib/checkbufferoverrun.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -605,7 +605,8 @@ static bool checkBufferSize(const Token *ftok, const Library::ArgumentChecks::Mi
605605
case Library::ArgumentChecks::MinSize::Type::STRLEN:
606606
if (settings.library.isargformatstr(ftok, minsize.arg)) {
607607
return getMinFormatStringOutputLength(args, minsize.arg, settings) < bufferSize;
608-
} else if (arg) {
608+
}
609+
if (arg) {
609610
const Token *strtoken = arg->getValueTokenMaxStrLength();
610611
if (strtoken)
611612
return Token::getStrLength(strtoken) < bufferSize;

lib/mathlib.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -655,8 +655,7 @@ bool MathLib::isDecimalFloat(const std::string &str)
655655
case State::MANTISSA_PLUSMINUS:
656656
if (!std::isdigit(static_cast<unsigned char>(*it)))
657657
return false;
658-
else
659-
state = State::MANTISSA_DIGITS;
658+
state = State::MANTISSA_DIGITS;
660659
break;
661660
case State::MANTISSA_DIGITS:
662661
if (*it=='f' || *it=='F')

0 commit comments

Comments
 (0)