style: local variable entry shadows outer symbol
Many functions have a variable entry in a sub namespace to the outer
symbol entry from phosphor-logging/log.hpp
[phosphor-logging/log.hpp:73] -> [log_manager.hpp:104]: (style) Local
variable entry shadows outer symbol
[phosphor-logging/log.hpp:73] -> [log_manager.cpp:226]: (style) Local
variable entry shadows outer symbol
[phosphor-logging/log.hpp:73] -> [log_manager.cpp:243]: (style) Local
variable entry shadows outer symbol
[phosphor-logging/log.hpp:73] -> [elog_meta.hpp:37]: (style) Local
variable entry shadows outer symbol
Change-Id: Icf5d585ec05b0a545e515d0afb7d2267645a2f2c
Signed-off-by: Patrick Venture <venture@google.com>
diff --git a/elog_meta.hpp b/elog_meta.hpp
index 6e44406..b44f52d 100644
--- a/elog_meta.hpp
+++ b/elog_meta.hpp
@@ -34,13 +34,13 @@
std::map<std::string, std::string>& metadata)
{
constexpr auto separator = '=';
- for (const auto& entry : data)
+ for (const auto& entryItem : data)
{
- auto pos = entry.find(separator);
+ auto pos = entryItem.find(separator);
if (std::string::npos != pos)
{
- auto key = entry.substr(0, entry.find(separator));
- auto value = entry.substr(entry.find(separator) + 1);
+ auto key = entryItem.substr(0, entryItem.find(separator));
+ auto value = entryItem.substr(entryItem.find(separator) + 1);
metadata.emplace(std::move(key), std::move(value));
}
}