From 522d98ea2856412aa30384bba0c2518dbd78b7f1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Joan=20Sol=C3=A0?= <jsola@iri.upc.edu>
Date: Tue, 24 Mar 2020 09:34:17 +0100
Subject: [PATCH] Replace map --> unordered_map

---
 include/core/state_block/has_state_blocks.h | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/include/core/state_block/has_state_blocks.h b/include/core/state_block/has_state_blocks.h
index ade367fb8..10aa727af 100644
--- a/include/core/state_block/has_state_blocks.h
+++ b/include/core/state_block/has_state_blocks.h
@@ -26,7 +26,7 @@ class HasStateBlocks
         void appendToStructure(const std::string& _frame_type){ structure_ += _frame_type; }
         bool isInStructure(const std::string& _sb_type) { return structure_.find(_sb_type) != std::string::npos; }
 
-        const std::map<std::string, StateBlockPtr>& getStateBlockMap() const;
+        const std::unordered_map<std::string, StateBlockPtr>& getStateBlockMap() const;
         std::vector<StateBlockPtr> getStateBlockVec() const;
 
         // Some typical shortcuts -- not all should be coded here, see notes below.
@@ -64,15 +64,15 @@ class HasStateBlocks
         void removeStateBlocks(ProblemPtr _problem);
 
         // States
-        virtual void setState(const Eigen::VectorXd& _state, const bool _notify = true);
+        virtual void    setState(const Eigen::VectorXd& _state, const bool _notify = true);
         Eigen::VectorXd getState() const;
-        void getState(Eigen::VectorXd& _state) const;
-        unsigned int getSize() const;
-        unsigned int getLocalSize() const;
+        void            getState(Eigen::VectorXd& _state) const;
+        unsigned int    getSize() const;
+        unsigned int    getLocalSize() const;
 
     private:
         std::string structure_;
-        std::map<std::string, StateBlockPtr> state_block_map_;
+        std::unordered_map<std::string, StateBlockPtr> state_block_map_;
 
 };
 
@@ -97,7 +97,7 @@ inline HasStateBlocks::~HasStateBlocks()
     //
 }
 
-inline const std::map<std::string, StateBlockPtr>& HasStateBlocks::getStateBlockMap() const
+inline const std::unordered_map<std::string, StateBlockPtr>& HasStateBlocks::getStateBlockMap() const
 {
     return state_block_map_;
 }
-- 
GitLab