diff options
author | Regina Pfeifer <regina@mailbox.org> | 2018-12-13 18:41:05 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2019-01-15 16:40:25 (GMT) |
commit | 414aa6c81ec62ab2f728fab31aa189ce674484a4 (patch) | |
tree | 0b70c8ae470b1cfebd205af33754bf577c3b277d /Source/cmSourceGroupCommand.cxx | |
parent | d4a42dd4a87c9caa222a7a40150db937258698d2 (diff) | |
download | CMake-414aa6c81ec62ab2f728fab31aa189ce674484a4.zip CMake-414aa6c81ec62ab2f728fab31aa189ce674484a4.tar.gz CMake-414aa6c81ec62ab2f728fab31aa189ce674484a4.tar.bz2 |
clang-tidy: Simplify boolean expressions
Diffstat (limited to 'Source/cmSourceGroupCommand.cxx')
-rw-r--r-- | Source/cmSourceGroupCommand.cxx | 24 |
1 files changed, 8 insertions, 16 deletions
diff --git a/Source/cmSourceGroupCommand.cxx b/Source/cmSourceGroupCommand.cxx index c3df313..08f4d1a 100644 --- a/Source/cmSourceGroupCommand.cxx +++ b/Source/cmSourceGroupCommand.cxx @@ -254,16 +254,12 @@ bool cmSourceGroupCommand::InitialPass(std::vector<std::string> const& args, bool cmSourceGroupCommand::checkArgumentsPreconditions( const ParsedArguments& parsedArguments, std::string& errorMsg) const { - if (!checkSingleParameterArgumentPreconditions(kPrefixOptionName, - parsedArguments, errorMsg) || - !checkSingleParameterArgumentPreconditions(kTreeOptionName, - parsedArguments, errorMsg) || - !checkSingleParameterArgumentPreconditions(kRegexOptionName, - parsedArguments, errorMsg)) { - return false; - } - - return true; + return checkSingleParameterArgumentPreconditions( + kPrefixOptionName, parsedArguments, errorMsg) && + checkSingleParameterArgumentPreconditions(kTreeOptionName, parsedArguments, + errorMsg) && + checkSingleParameterArgumentPreconditions(kRegexOptionName, + parsedArguments, errorMsg); } bool cmSourceGroupCommand::processTree(ParsedArguments& parsedArguments, @@ -286,12 +282,8 @@ bool cmSourceGroupCommand::processTree(ParsedArguments& parsedArguments, std::set<std::string> sourceGroupPaths = getSourceGroupFilesPaths(root, filesVector); - if (!addFilesToItsSourceGroups(root, sourceGroupPaths, prefix, - *(this->Makefile), errorMsg)) { - return false; - } - - return true; + return addFilesToItsSourceGroups(root, sourceGroupPaths, prefix, + *(this->Makefile), errorMsg); } bool cmSourceGroupCommand::checkSingleParameterArgumentPreconditions( |