The Road to Clang-Format part 1

Whitespace: The Darkening

Change-Id: I9c0c355ddf22f9b27763c97e3e85079c135ae7a7
Signed-off-by: Zane Shelley <zshelle@us.ibm.com>
diff --git a/src/isolator/hei_isolation_node.cpp b/src/isolator/hei_isolation_node.cpp
index a0bbf37..b30a678 100644
--- a/src/isolator/hei_isolation_node.cpp
+++ b/src/isolator/hei_isolation_node.cpp
@@ -5,8 +5,8 @@
 
 //------------------------------------------------------------------------------
 
-bool IsolationNode::analyze( const Chip & i_chip, AttentionType_t i_attnType,
-                             IsolationData & io_isoData ) const
+bool IsolationNode::analyze(const Chip & i_chip, AttentionType_t i_attnType,
+                            IsolationData & io_isoData) const
 {
     bool o_activeAttn = false; // Initially, assume no active attentions.
 
@@ -14,34 +14,34 @@
     pushIsolationStack();
 
     // A rule for i_attnType must exist.
-    auto rule_itr = iv_rules.find( i_attnType );
-    HEI_ASSERT( iv_rules.end() != rule_itr );
+    auto rule_itr = iv_rules.find(i_attnType);
+    HEI_ASSERT(iv_rules.end() != rule_itr);
 
     // Get the returned BitString for this rule.
-    const BitString * bs = rule_itr->second->getBitString( i_chip );
+    const BitString * bs = rule_itr->second->getBitString(i_chip);
 
     // Ensure this BitString is not longer than the maximum bit field.
-    HEI_ASSERT( bs->getBitLen() <= sizeof(RegisterBit_t) * 8 );
+    HEI_ASSERT(bs->getBitLen() <= sizeof(RegisterBit_t) * 8);
 
     // Find all active bits for this rule.
-    for ( RegisterBit_t bit = 0; bit < bs->getBitLen(); bit++ )
+    for (RegisterBit_t bit = 0; bit < bs->getBitLen(); bit++)
     {
         // Continue to the next bit if not active.
-        if ( !bs->isBitSet(bit) ) continue;
+        if (!bs->isBitSet(bit)) continue;
 
         // At least one active bit was found.
         o_activeAttn = true;
 
         // Determine if this attention originated from another register or if it
         // is a leaf in the isolation tree.
-        auto child_itr = iv_children.find( bit );
-        if ( iv_children.end() != child_itr )
+        auto child_itr = iv_children.find(bit);
+        if (iv_children.end() != child_itr)
         {
             // This bit was driven from an attention from another register.
             // Continue down the isolation tree to look for more attentions.
-            bool attnFound = child_itr->second->analyze( i_chip, i_attnType,
-                                                         io_isoData );
-            if ( !attnFound )
+            bool attnFound = child_itr->second->analyze(i_chip, i_attnType,
+                                                        io_isoData);
+            if (!attnFound)
             {
                 // Something went wrong. There should have been an active
                 // attention. It's possible there is a bug in the Chip Data
@@ -53,18 +53,18 @@
                 // io_isoData. If there are no other active attentions, the user
                 // application could use this signature to help determine, and
                 // circumvent, the isolation problem.
-                io_isoData.addSignature( Signature { i_chip, iv_hwReg.getId(),
-                                                     iv_hwReg.getInstance(),
-                                                     bit, i_attnType } );
+                io_isoData.addSignature(Signature { i_chip, iv_hwReg.getId(),
+                                                    iv_hwReg.getInstance(),
+                                                    bit, i_attnType });
             }
         }
         else
         {
             // We have reached a leaf in the isolation tree. Add this bit's
             // signature to io_isoData.
-            io_isoData.addSignature( Signature { i_chip, iv_hwReg.getId(),
-                                                 iv_hwReg.getInstance(),
-                                                 bit, i_attnType } );
+            io_isoData.addSignature(Signature { i_chip, iv_hwReg.getId(),
+                                                iv_hwReg.getInstance(),
+                                                bit, i_attnType });
         }
     }
 
@@ -76,14 +76,13 @@
 
 //------------------------------------------------------------------------------
 
-void IsolationNode::addRule( AttentionType_t i_attnType,
-                             const Register * i_rule )
+void IsolationNode::addRule(AttentionType_t i_attnType, const Register * i_rule)
 {
     // A rule for this attention type should not already exist.
-    HEI_ASSERT( iv_rules.end() == iv_rules.find(i_attnType) );
+    HEI_ASSERT(iv_rules.end() == iv_rules.find(i_attnType));
 
     // The rule should not be null.
-    HEI_ASSERT( nullptr != i_rule );
+    HEI_ASSERT(nullptr != i_rule);
 
     // Add the new rule.
     iv_rules[i_attnType] = i_rule;
@@ -91,13 +90,13 @@
 
 //------------------------------------------------------------------------------
 
-void IsolationNode::addChild( uint8_t i_bit, const IsolationNode * i_child )
+void IsolationNode::addChild(uint8_t i_bit, const IsolationNode * i_child)
 {
     // An entry for this bit should not already exist.
-    HEI_ASSERT( iv_children.end() == iv_children.find(i_bit) );
+    HEI_ASSERT(iv_children.end() == iv_children.find(i_bit));
 
     // The child register should not be null.
-    HEI_ASSERT( nullptr != i_child );
+    HEI_ASSERT(nullptr != i_child);
 
     // Add the new rule.
     iv_children[i_bit] = i_child;
@@ -112,15 +111,14 @@
 void IsolationNode::pushIsolationStack() const
 {
     // Ensure this node does not already exist in cv_isolationStack.
-    auto itr = std::find( cv_isolationStack.begin(),
-                          cv_isolationStack.end(), this );
-    HEI_ASSERT( cv_isolationStack.end() == itr );
+    auto itr = std::find(cv_isolationStack.begin(),
+                         cv_isolationStack.end(), this);
+    HEI_ASSERT(cv_isolationStack.end() == itr);
 
     // Push to node to the stack.
-    cv_isolationStack.push_back( this );
+    cv_isolationStack.push_back(this);
 }
 
 //------------------------------------------------------------------------------
 
 } // end namespace libhei
-
diff --git a/src/isolator/hei_isolation_node.hpp b/src/isolator/hei_isolation_node.hpp
index eaf18e5..3fc8a37 100644
--- a/src/isolator/hei_isolation_node.hpp
+++ b/src/isolator/hei_isolation_node.hpp
@@ -42,8 +42,8 @@
      * @param i_hwReg A reference to the HardwareRegister targeted for
      *                isolation.
      */
-    explicit IsolationNode( const HardwareRegister & i_hwReg ) :
-        iv_hwReg( i_hwReg )
+    explicit IsolationNode(const HardwareRegister & i_hwReg) :
+        iv_hwReg(i_hwReg)
     {}
 
     /** @brief Destructor. */
@@ -60,7 +60,7 @@
      *
      * Needed by Flyweight class, but should not be allowed in general.
      */
-    IsolationNode( const IsolationNode & ) = default;
+    IsolationNode(const IsolationNode &) = default;
 
     /**
      * @brief Explicitly disables assignment operator.
@@ -69,7 +69,7 @@
      * of the constant instance variables, but helps communicate it is not
      * allowed.
      */
-    IsolationNode & operator=( const IsolationNode & ) = delete;
+    IsolationNode & operator=(const IsolationNode &) = delete;
 
   private: // Instance variables
 
@@ -111,8 +111,8 @@
      * @return True, if any active attentions found on this register.
      *         False, otherwise.
      */
-    bool analyze( const Chip & i_chip, AttentionType_t i_attnType,
-                  IsolationData & io_isoData ) const;
+    bool analyze(const Chip & i_chip, AttentionType_t i_attnType,
+                 IsolationData & io_isoData) const;
 
     // TODO: The next two functions are only intended to be used during
     //       initialization of the isolator. Consider, making them private and
@@ -129,7 +129,7 @@
      * @param The target attention type.
      * @param The rule for this attention type.
      */
-    void addRule( AttentionType_t i_attnType, const Register * i_rule );
+    void addRule(AttentionType_t i_attnType, const Register * i_rule);
 
     /**
      * @brief Adds a child register to analyze for the given bit in this
@@ -141,22 +141,22 @@
      * @param The target bit on this register.
      * @param The child register to analyze for the given bit.
      */
-    void addChild( RegisterBit_t i_bit, const IsolationNode * i_child );
+    void addChild(RegisterBit_t i_bit, const IsolationNode * i_child);
 
   public: // Operators
 
     /** @brief Equals operator. */
-    bool operator==( const IsolationNode & i_r ) const
+    bool operator==(const IsolationNode & i_r) const
     {
         // iv_hwReg should be unique per IsolationNode.
-        return ( iv_hwReg == i_r.iv_hwReg );
+        return (iv_hwReg == i_r.iv_hwReg);
     }
 
     /** @brief Less than operator. */
-    bool operator<( const IsolationNode & i_r ) const
+    bool operator<(const IsolationNode & i_r) const
     {
         // iv_hwReg should be unique per IsolationNode.
-        return ( iv_hwReg < i_r.iv_hwReg );
+        return (iv_hwReg < i_r.iv_hwReg);
     }
 
   private: // Isolation stack and supporting functions.
@@ -187,4 +187,3 @@
 };
 
 } // end namespace libhei
-
diff --git a/src/isolator/hei_isolator.cpp b/src/isolator/hei_isolator.cpp
index e977054..45ca647 100644
--- a/src/isolator/hei_isolator.cpp
+++ b/src/isolator/hei_isolator.cpp
@@ -11,29 +11,29 @@
 namespace libhei
 {
 
-ReturnCode Isolator::initialize( void * i_buffer, size_t i_bufferSize,
-                                 bool i_forceInit )
+ReturnCode Isolator::initialize(void * i_buffer, size_t i_bufferSize,
+                                bool i_forceInit)
 {
     ReturnCode rc;
 
     // BEGIN temporary code
-    HEI_INF( "Isolator::initialize(%p,%lu,%d)", i_buffer, i_bufferSize,
-             i_forceInit );
+    HEI_INF("Isolator::initialize(%p,%lu,%d)", i_buffer, i_bufferSize,
+            i_forceInit);
 
     Flyweight<ScomRegister>   & sfw = Flyweight<ScomRegister>::getSingleton();
     Flyweight<IdScomRegister> & ifw = Flyweight<IdScomRegister>::getSingleton();
 
-    sfw.get( ScomRegister { CHIP_TYPE_INVALID, REG_ID_INVALID,
-                            REG_INST_DEFAULT, REG_ACCESS_RW, 0x01234567 } );
-    sfw.get( ScomRegister { CHIP_TYPE_INVALID, REG_ID_INVALID,
-                            REG_INST_DEFAULT, REG_ACCESS_RW, 0x00112233 } );
+    sfw.get(ScomRegister { CHIP_TYPE_INVALID, REG_ID_INVALID,
+                           REG_INST_DEFAULT, REG_ACCESS_RW, 0x01234567 });
+    sfw.get(ScomRegister { CHIP_TYPE_INVALID, REG_ID_INVALID,
+                           REG_INST_DEFAULT, REG_ACCESS_RW, 0x00112233 });
 
-    ifw.get( IdScomRegister { CHIP_TYPE_INVALID, REG_ID_INVALID,
-                              REG_INST_DEFAULT, REG_ACCESS_RW,
-                              0x0123456789abcdef } );
-    ifw.get( IdScomRegister { CHIP_TYPE_INVALID, REG_ID_INVALID,
-                              REG_INST_DEFAULT, REG_ACCESS_RW,
-                              0x0011223344556677 } );
+    ifw.get(IdScomRegister { CHIP_TYPE_INVALID, REG_ID_INVALID,
+                             REG_INST_DEFAULT, REG_ACCESS_RW,
+                             0x0123456789abcdef });
+    ifw.get(IdScomRegister { CHIP_TYPE_INVALID, REG_ID_INVALID,
+                             REG_INST_DEFAULT, REG_ACCESS_RW,
+                             0x0011223344556677 });
     // END temporary code
 
     return rc;
@@ -54,8 +54,8 @@
     Flyweight<IdScomRegister>::getSingleton().clear();
 }
 
-ReturnCode Isolator::isolate( const std::vector<Chip> & i_chipList,
-                              IsolationData & o_isoData ) const
+ReturnCode Isolator::isolate(const std::vector<Chip> & i_chipList,
+                             IsolationData & o_isoData) const
 {
     ReturnCode rc;
 
@@ -66,11 +66,10 @@
     HardwareRegister::flushAll();
 
     // Analyze active error on each chip.
-    for ( auto const & chip : i_chipList )
+    for (auto const & chip : i_chipList)
     {
         // BEGIN temporary code
-        HEI_INF( "Isolator::isolate(%p,%u)", chip.getChip(),
-                 chip.getType() );
+        HEI_INF("Isolator::isolate(%p,%u)", chip.getChip(), chip.getType());
         // END temporary code
     }
 
diff --git a/src/isolator/hei_isolator.hpp b/src/isolator/hei_isolator.hpp
index 1cc29b7..3c4a589 100644
--- a/src/isolator/hei_isolator.hpp
+++ b/src/isolator/hei_isolator.hpp
@@ -41,10 +41,10 @@
     }
 
     /** @brief Copy constructor. */
-    Isolator( const Isolator & ) = delete;
+    Isolator(const Isolator &) = delete;
 
     /** @brief Assignment operator. */
-    Isolator & operator=( const Isolator & ) = delete;
+    Isolator & operator=(const Isolator &) = delete;
 
   public:
 
@@ -56,8 +56,8 @@
     }
 
     /** @brief See API wrapper description in hei_main.hpp. */
-    ReturnCode initialize( void * i_buffer, size_t i_bufferSize,
-                           bool i_forceInit = false );
+    ReturnCode initialize(void * i_buffer, size_t i_bufferSize,
+                          bool i_forceInit = false);
 
     /**
      * @brief See API wrapper description in hei_main.hpp.
@@ -68,8 +68,8 @@
     void uninitialize();
 
     /** @brief See API wrapper description in hei_main.hpp. */
-    ReturnCode isolate( const std::vector<Chip> & i_chipList,
-                        IsolationData & o_isoData ) const;
+    ReturnCode isolate(const std::vector<Chip> & i_chipList,
+                       IsolationData & o_isoData) const;
 
   private:
 
diff --git a/src/isolator/hei_signature.hpp b/src/isolator/hei_signature.hpp
index 018673a..4be04b3 100644
--- a/src/isolator/hei_signature.hpp
+++ b/src/isolator/hei_signature.hpp
@@ -25,21 +25,21 @@
      * @param i_bit      The target bit within this register.
      * @param i_attnType The attention type reported by this bit.
      */
-    Signature( const Chip & i_chip, RegisterId_t i_id,
-               RegisterInstance_t i_instance, RegisterBit_t i_bit,
-               AttentionType_t i_attnType ) :
-        iv_chip( i_chip ), iv_id( i_id ), iv_instance( i_instance ),
-        iv_bit( i_bit ), iv_attnType( i_attnType )
+    Signature(const Chip & i_chip, RegisterId_t i_id,
+              RegisterInstance_t i_instance, RegisterBit_t i_bit,
+              AttentionType_t i_attnType) :
+        iv_chip(i_chip), iv_id(i_id), iv_instance(i_instance),
+        iv_bit(i_bit), iv_attnType(i_attnType)
     {}
 
     /** @brief Destructor. */
     ~Signature() = default;
 
     /** @brief Copy constructor. */
-    Signature( const Signature & ) = default;
+    Signature(const Signature &) = default;
 
     /** @brief Assignment operator. */
-    Signature & operator=( const Signature & ) = default;
+    Signature & operator=(const Signature &) = default;
 
   private: // Instance variables.
 
@@ -68,4 +68,3 @@
 };
 
 } // end namespace libhei
-