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/fault-monitor/operational-status-monitor.cpp b/fault-monitor/operational-status-monitor.cpp
index de6ee21..1114463 100644
--- a/fault-monitor/operational-status-monitor.cpp
+++ b/fault-monitor/operational-status-monitor.cpp
@@ -23,7 +23,7 @@
// Get all the properties of
// "xyz.openbmc_project.State.Decorator.OperationalStatus" interface
std::string interfaceName{};
- std::map<std::string, std::variant<bool>> properties;
+ std::unordered_map<std::string, std::variant<bool>> properties;
msg.read(interfaceName, properties);
const auto it = properties.find("Functional");