summaryrefslogtreecommitdiffstats
path: root/src/elog.hpp
diff options
context:
space:
mode:
authorMatt Spinler <spinler@us.ibm.com>2018-02-26 09:14:31 -0600
committerBrad Bishop <bradleyb@fuzziesquirrel.com>2018-02-27 18:36:05 +0000
commit1abcb06bedadfbd40b4ec6f7e5f6a95021df3c96 (patch)
tree119da3b2d0af7e31a42dc29f8ec7dc79a85f9af3 /src/elog.hpp
parent3c5318d843651dd18a6b8b0da67e3aaef810ca91 (diff)
downloadphosphor-dbus-monitor-1abcb06bedadfbd40b4ec6f7e5f6a95021df3c96.tar.gz
phosphor-dbus-monitor-1abcb06bedadfbd40b4ec6f7e5f6a95021df3c96.zip
Add constants for tuple fields
Add constants for use with std::get. Tested: Run unit tests Change-Id: Ic09c13feeda69d61c98f63d227cae8f08d1bf50e Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Diffstat (limited to 'src/elog.hpp')
-rw-r--r--src/elog.hpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/elog.hpp b/src/elog.hpp
index 3f8ae3b..234ef6f 100644
--- a/src/elog.hpp
+++ b/src/elog.hpp
@@ -171,7 +171,7 @@ class ElogWithMetadataCapture : public IndexedCallback
* @brief Builds a metadata string with property information
*
* Finds all of the properties in the index that have
- * their condition pass/fail fields (get<1>(storage))
+ * their condition pass/fail fields (get<resultIndex>(storage))
* set to true, and then packs those paths, names, and values
* into a metadata string that looks like:
*
@@ -185,16 +185,17 @@ class ElogWithMetadataCapture : public IndexedCallback
for (const auto& n : index)
{
- const auto& storage = std::get<2>(n.second).get();
- const auto& result = std::get<1>(storage);
+ const auto& storage = std::get<storageIndex>(n.second).get();
+ const auto& result = std::get<resultIndex>(storage);
if (!result.empty() && any_ns::any_cast<bool>(result))
{
- const auto& path = std::get<0>(n.first).get();
- const auto& propertyName = std::get<2>(n.first).get();
+ const auto& path = std::get<pathIndex>(n.first).get();
+ const auto& propertyName = std::get<propertyIndex>(
+ n.first).get();
auto value = ToString<propertyType>::op(
any_ns::any_cast<propertyType>(
- std::get<0>(storage)));
+ std::get<valueIndex>(storage)));
metadata += path + ":" + propertyName +
'=' + value + '|';
OpenPOWER on IntegriCloud