From 8e2a03c07833f8715a498ee11d32f3345985c163 Mon Sep 17 00:00:00 2001 From: Alex Turbov Date: Tue, 23 Aug 2022 20:22:30 +0400 Subject: ctest.cxx: Eliminate redundand trenary operator --- Source/QtDialog/CMakeSetup.cxx | 2 +- Source/cmakemain.cxx | 2 +- Source/ctest.cxx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Source/QtDialog/CMakeSetup.cxx b/Source/QtDialog/CMakeSetup.cxx index 591b793..a15ec81 100644 --- a/Source/QtDialog/CMakeSetup.cxx +++ b/Source/QtDialog/CMakeSetup.cxx @@ -91,7 +91,7 @@ int main(int argc, char** argv) doc.AppendSection("Generators", generators); doc.PrependSection("Options", cmDocumentationOptions); - return (doc.PrintRequestedDocumentation(std::cout) ? 0 : 1); + return !doc.PrintRequestedDocumentation(std::cout); } #if defined(Q_OS_MAC) diff --git a/Source/cmakemain.cxx b/Source/cmakemain.cxx index c082b67..3f1fe6c 100644 --- a/Source/cmakemain.cxx +++ b/Source/cmakemain.cxx @@ -227,7 +227,7 @@ int do_cmake(int ac, char const* const* av) doc.AppendSection("Generators", generators); doc.PrependSection("Options", cmDocumentationOptions); - return doc.PrintRequestedDocumentation(std::cout) ? 0 : 1; + return !doc.PrintRequestedDocumentation(std::cout); } #else if (ac == 1) { diff --git a/Source/ctest.cxx b/Source/ctest.cxx index 6310595..9e632df 100644 --- a/Source/ctest.cxx +++ b/Source/ctest.cxx @@ -215,7 +215,7 @@ int main(int argc, char const* const* argv) doc.SetSection("Name", cmDocumentationName); doc.SetSection("Usage", cmDocumentationUsage); doc.PrependSection("Options", cmDocumentationOptions); - return doc.PrintRequestedDocumentation(std::cout) ? 0 : 1; + return !doc.PrintRequestedDocumentation(std::cout); } } -- cgit v0.12