diff options
author | Patrick Venture <venture@google.com> | 2018-10-26 18:14:00 -0700 |
---|---|---|
committer | Patrick Venture <venture@google.com> | 2018-10-26 18:16:27 -0700 |
commit | f18bf836d206b1bc5b4fd849127a2e706eddf0aa (patch) | |
tree | 5c61f65861a2350f84080f21c6b996d33d0c2ab3 /elog_meta.cpp | |
parent | aabb92ef56c4faa8f05487e9fcdf83f1053f1a22 (diff) | |
download | phosphor-logging-f18bf836d206b1bc5b4fd849127a2e706eddf0aa.tar.gz phosphor-logging-f18bf836d206b1bc5b4fd849127a2e706eddf0aa.zip |
add .clang-format
Change-Id: I2c36b7886a25d0b235693b0776019d29608e1d52
Signed-off-by: Patrick Venture <venture@google.com>
Diffstat (limited to 'elog_meta.cpp')
-rw-r--r-- | elog_meta.cpp | 36 |
1 files changed, 15 insertions, 21 deletions
diff --git a/elog_meta.cpp b/elog_meta.cpp index 514296e..98425d4 100644 --- a/elog_meta.cpp +++ b/elog_meta.cpp @@ -1,4 +1,5 @@ #include "config.h" + #include "elog_meta.hpp" namespace phosphor @@ -13,41 +14,34 @@ namespace associations #if defined PROCESS_META template <> -void build<xyz::openbmc_project::Common:: - Callout::Device::CALLOUT_DEVICE_PATH>( - const std::string& match, - const std::vector<std::string>& data, +void build<xyz::openbmc_project::Common::Callout::Device::CALLOUT_DEVICE_PATH>( + const std::string& match, const std::vector<std::string>& data, AssociationList& list) { std::map<std::string, std::string> metadata; parse(data, metadata); auto iter = metadata.find(match); - if(metadata.end() != iter) + if (metadata.end() != iter) { - auto comp = [](const auto& first, const auto& second) - { + auto comp = [](const auto& first, const auto& second) { return (strcmp(std::get<0>(first), second) < 0); }; - auto callout = std::lower_bound(callouts.begin(), - callouts.end(), - (iter->second).c_str(), - comp); - if((callouts.end() != callout) && - !strcmp((iter->second).c_str(), std::get<0>(*callout))) + auto callout = std::lower_bound(callouts.begin(), callouts.end(), + (iter->second).c_str(), comp); + if ((callouts.end() != callout) && + !strcmp((iter->second).c_str(), std::get<0>(*callout))) { - list.emplace_back(std::make_tuple(CALLOUT_FWD_ASSOCIATION, - CALLOUT_REV_ASSOCIATION, - std::string(INVENTORY_ROOT) + - std::get<1>(*callout))); + list.emplace_back(std::make_tuple( + CALLOUT_FWD_ASSOCIATION, CALLOUT_REV_ASSOCIATION, + std::string(INVENTORY_ROOT) + std::get<1>(*callout))); } } } template <> -void build<xyz::openbmc_project::Common:: - Callout::Inventory::CALLOUT_INVENTORY_PATH>( - const std::string& match, - const std::vector<std::string>& data, +void build< + xyz::openbmc_project::Common::Callout::Inventory::CALLOUT_INVENTORY_PATH>( + const std::string& match, const std::vector<std::string>& data, AssociationList& list) { std::map<std::string, std::string> metadata; |