Skip to content

Commit 59e361b

Browse files
committed
Small refactoring in CppCheck::check return logic
1 parent f0866e5 commit 59e361b

1 file changed

Lines changed: 1 addition & 8 deletions

File tree

lib/cppcheck.cpp

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -784,16 +784,9 @@ unsigned int CppCheck::check(const FileWithDetails &file)
784784
ErrorMessage msg({}, file.spath(), Severity::information, "", "", Certainty::normal);
785785
(void)mSuppressions.nomsg.isSuppressed(SuppressionList::ErrorMessage::fromErrorMessage(msg, {}), true);
786786
}
787-
788-
unsigned int returnValue;
789-
if (mSettings.clang)
790-
returnValue = checkClang(file, 0);
791-
else
792-
returnValue = checkFile(file, "", 0);
793-
794787
// TODO: call analyseClangTidy()
795788

796-
return returnValue;
789+
return mSettings.clang ? checkClang(file, 0) : checkFile(file, "", 0);
797790
}
798791

799792
unsigned int CppCheck::checkBuffer(const FileWithDetails &file, const uint8_t* data, std::size_t size)

0 commit comments

Comments
 (0)