summaryrefslogtreecommitdiff
path: root/Source/cmMessageCommand.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-08-22 11:26:35 -0400
committerBrad King <brad.king@kitware.com>2019-08-26 09:43:46 -0400
commit51565abe7929f4baf5772345dc8d9c62ece9cf7a (patch)
treefcea744dda9ff336f96011579aa8cae9509968be /Source/cmMessageCommand.cxx
parentb1cfaf7b91f87fed0c70a6a7763d565023420788 (diff)
downloadcmake-51565abe7929f4baf5772345dc8d9c62ece9cf7a.tar.gz
cmMessageCommand: Remove extra layer of parentheses
The logic checking `CMAKE_WARN_DEPRECATED` contained an unnecessary layer of parentheses. The condition is of the form `!IsSet || IsOn` which is correct because the documentation says that the behavior is enabled unless the variable is explicitly set to a false value. Issue: #19610
Diffstat (limited to 'Source/cmMessageCommand.cxx')
-rw-r--r--Source/cmMessageCommand.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/cmMessageCommand.cxx b/Source/cmMessageCommand.cxx
index 3f333121df..39b40b8b0e 100644
--- a/Source/cmMessageCommand.cxx
+++ b/Source/cmMessageCommand.cxx
@@ -70,8 +70,8 @@ bool cmMessageCommand(std::vector<std::string> const& args,
fatal = true;
type = MessageType::DEPRECATION_ERROR;
level = cmake::LogLevel::LOG_ERROR;
- } else if ((!status.GetMakefile().IsSet("CMAKE_WARN_DEPRECATED") ||
- status.GetMakefile().IsOn("CMAKE_WARN_DEPRECATED"))) {
+ } else if (!status.GetMakefile().IsSet("CMAKE_WARN_DEPRECATED") ||
+ status.GetMakefile().IsOn("CMAKE_WARN_DEPRECATED")) {
type = MessageType::DEPRECATION_WARNING;
level = cmake::LogLevel::LOG_WARNING;
} else {