summaryrefslogtreecommitdiff
path: root/Source/cmSourceGroupCommand.cxx
diff options
context:
space:
mode:
authorRegina Pfeifer <regina@mailbox.org>2018-12-13 19:41:05 +0100
committerBrad King <brad.king@kitware.com>2019-01-15 11:40:25 -0500
commit414aa6c81ec62ab2f728fab31aa189ce674484a4 (patch)
tree0b70c8ae470b1cfebd205af33754bf577c3b277d /Source/cmSourceGroupCommand.cxx
parentd4a42dd4a87c9caa222a7a40150db937258698d2 (diff)
downloadcmake-414aa6c81ec62ab2f728fab31aa189ce674484a4.tar.gz
clang-tidy: Simplify boolean expressions
Diffstat (limited to 'Source/cmSourceGroupCommand.cxx')
-rw-r--r--Source/cmSourceGroupCommand.cxx24
1 files changed, 8 insertions, 16 deletions
diff --git a/Source/cmSourceGroupCommand.cxx b/Source/cmSourceGroupCommand.cxx
index c3df313e18..08f4d1ab07 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(