From 1abcb06bedadfbd40b4ec6f7e5f6a95021df3c96 Mon Sep 17 00:00:00 2001 From: Matt Spinler Date: Mon, 26 Feb 2018 09:14:31 -0600 Subject: Add constants for tuple fields Add constants for use with std::get. Tested: Run unit tests Change-Id: Ic09c13feeda69d61c98f63d227cae8f08d1bf50e Signed-off-by: Matt Spinler --- src/count.hpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/count.hpp') diff --git a/src/count.hpp b/src/count.hpp index 0da0324..9f0ce3e 100644 --- a/src/count.hpp +++ b/src/count.hpp @@ -64,18 +64,19 @@ class CountCondition : public IndexedConditional { //Get the property value from storage[0], //and save the op result in storage[1]. - const auto& storage = std::get<2>( + const auto& storage = std::get( item.second); // Don't count properties that don't exist. - if (std::get<0>(storage.get()).empty()) + if (std::get( + storage.get()).empty()) { return false; } const auto& value = any_ns::any_cast( - std::get<0>(storage.get())); + std::get(storage.get())); auto r = propertyOp(value); - std::get<1>(storage.get()) = r; + std::get(storage.get()) = r; return r; }); -- cgit v1.2.1