switch map to unordered_map

Generally, unordered_maps should be preferred over map because they have
faster access times (O(1)) and tend to allocate less dynamic memory.  We
do not rely on ordered iteration in any current use of maps, so it is
safe to do a full replace.

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: Ieaa28ac7f70f9913d13d25142fea9861d49bb23f
diff --git a/manager/json-parser.hpp b/manager/json-parser.hpp
index 4388a21..06fb096 100644
--- a/manager/json-parser.hpp
+++ b/manager/json-parser.hpp
@@ -16,11 +16,12 @@
 
 using Json = nlohmann::json;
 using LedAction = std::set<phosphor::led::Layout::LedAction>;
-using LedMap = std::map<std::string, LedAction>;
+using LedMap = std::unordered_map<std::string, LedAction>;
 
 // Priority for a particular LED needs to stay SAME across all groups
 // phosphor::led::Layout::Action can only be one of `Blink` and `On`
-using PriorityMap = std::map<std::string, phosphor::led::Layout::Action>;
+using PriorityMap =
+    std::unordered_map<std::string, phosphor::led::Layout::Action>;
 
 /** @brief Parse LED JSON file and output Json object
  *
@@ -70,7 +71,7 @@
  *
  *  @param[in] name - led name member of each group
  *  @param[in] priority - member priority of each group
- *  @param[out] priorityMap - std::map, key:name, value:priority
+ *  @param[out] priorityMap - std::unordered_map, key:name, value:priority
  *
  *  @return
  */
@@ -100,7 +101,7 @@
 
 /** @brief Load JSON config and return led map (JSON version 1)
  *
- *  @return LedMap - Generated an std::map of LedAction
+ *  @return LedMap - Generated an std::unordered_map of LedAction
  */
 const LedMap loadJsonConfigV1(const Json& json)
 {
@@ -138,7 +139,7 @@
             ledActions.emplace(ledAction);
         }
 
-        // Generated an std::map of LedGroupNames to std::set of LEDs
+        // Generated an std::unordered_map of LedGroupNames to std::set of LEDs
         // containing the name and properties.
         ledMap.emplace(objpath, ledActions);
     }
@@ -148,7 +149,7 @@
 
 /** @brief Load JSON config and return led map
  *
- *  @return LedMap - Generated an std::map of LedAction
+ *  @return LedMap - Generated an std::unordered_map of LedAction
  */
 const LedMap loadJsonConfig(const fs::path& path)
 {
@@ -172,7 +173,7 @@
 /** @brief Get led map from LED groups JSON config
  *
  *  @param[in] config - Path to the JSON config.
- *  @return LedMap - Generated an std::map of LedAction
+ *  @return LedMap - Generated an std::unordered_map of LedAction
  *
  *  @note if config is an empty string, daemon will interrogate dbus for
  *        compatible strings.