Skip to content

Commit d5cdce8

Browse files
committed
fixed readability-else-after-return clang-tidy warnings
1 parent b6a533f commit d5cdce8

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
@@ -603,7 +603,8 @@ static bool checkBufferSize(const Token *ftok, const Library::ArgumentChecks::Mi
603603
case Library::ArgumentChecks::MinSize::Type::STRLEN:
604604
if (settings.library.isargformatstr(ftok, minsize.arg)) {
605605
return getMinFormatStringOutputLength(args, minsize.arg) < bufferSize;
606-
} else if (arg) {
606+
}
607+
if (arg) {
607608
const Token *strtoken = arg->getValueTokenMaxStrLength();
608609
if (strtoken)
609610
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)