From 620771f67201da5e683ae4f71a6e90e7fc3f6dd4 Mon Sep 17 00:00:00 2001
From: Rocco Ardino <rocco.ardino@cern.ch>
Date: Tue, 27 Jun 2023 14:18:28 +0200
Subject: [PATCH] Prettify syntax of ternary selections in config.h

---
 src/config.h | 16 +++++-----------
 1 file changed, 5 insertions(+), 11 deletions(-)

diff --git a/src/config.h b/src/config.h
index a7ab5fe4..fb2d35bb 100644
--- a/src/config.h
+++ b/src/config.h
@@ -119,9 +119,7 @@ class config {
     return boost::lexical_cast<uint64_t>(v.c_str());
   }
 
-  bool getOutputForceWrite() const {
-    return (true ? vmap.at("output_force_write") == "yes" : false);
-  }
+  bool getOutputForceWrite() const { return (vmap.at("output_force_write") == "yes"); }
 
   uint32_t getNOrbitsPerDMAPacket() const {
     std::string v = vmap.at("NOrbitsPerDMAPacket");
@@ -143,15 +141,11 @@ class config {
     return boost::lexical_cast<short>(v.c_str());
   }
 
-  bool getEnableStreamProcessor() const {
-    return (true ? vmap.at("enable_stream_processor") == "yes" : false);
-  }
+  bool getEnableStreamProcessor() const { return (vmap.at("enable_stream_processor") == "yes"); }
 
-  bool getEnableElasticProcessor() const {
-    return (true ? vmap.at("enable_elastic_processor") == "yes" : false);
-  }
+  bool getEnableElasticProcessor() const { return (vmap.at("enable_elastic_processor") == "yes"); }
 
-  bool getDoZS() const { return (true ? vmap.at("doZS") == "yes" : false); }
+  bool getDoZS() const { return (vmap.at("doZS") == "yes"); }
 
   uint32_t getSourceID();
 
@@ -160,7 +154,7 @@ class config {
     return boost::lexical_cast<uint32_t>(v.c_str());
   }
 
-  bool getCMSSWHeaders() const { return (true ? vmap.at("cmsswHeaders") == "yes" : false); }
+  bool getCMSSWHeaders() const { return (vmap.at("cmsswHeaders") == "yes"); }
 
   uint32_t getNOrbitsPerFile() const {  // If > 0, the fixed N orbits per file option is performed
     std::string v = vmap.at("nOrbitsPerFile");
-- 
GitLab