diff options
author | Patrick Venture <venture@google.com> | 2018-10-23 19:51:10 -0700 |
---|---|---|
committer | Patrick Venture <venture@google.com> | 2018-11-07 20:03:29 +0000 |
commit | 438fb7957f4b763ba28b13ef36732b40e77bb226 (patch) | |
tree | 3aff2c2d906e0bfdbee6de60fd223dc19fa404c1 | |
parent | b0431c79872ad7d9ca9fcf543a769ef233f8c94c (diff) | |
download | phosphor-host-ipmid-438fb7957f4b763ba28b13ef36732b40e77bb226.tar.gz phosphor-host-ipmid-438fb7957f4b763ba28b13ef36732b40e77bb226.zip |
read_fru_data: use structured bindings in fru loop
Use structured bindings for first/second in fru loop.
Change-Id: Ief5460946ead910ccae653ebb6f9d894805b756d
Signed-off-by: Patrick Venture <venture@google.com>
-rw-r--r-- | read_fru_data.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/read_fru_data.cpp b/read_fru_data.cpp index 4723308..44ea11c 100644 --- a/read_fru_data.cpp +++ b/read_fru_data.cpp @@ -81,18 +81,14 @@ void processFruPropChange(sdbusplus::message::message& msg) { path.erase(0, strlen(OBJ_PATH)); } - for (auto& fru : frus) + for (const auto& [fruId, instanceList] : frus) { - auto& instanceList = fru.second; - auto found = std::find_if( instanceList.begin(), instanceList.end(), [&path](const auto& iter) { return (iter.path == path); }); if (found != instanceList.end()) { - auto& fruId = fru.first; - cache::fruMap.erase(fruId); break; } |