From 05a2ac3a9c9f794be8b6cea81a1d46283162b7d3 Mon Sep 17 00:00:00 2001 From: Matt Spinler Date: Mon, 19 Feb 2018 13:52:59 -0600 Subject: Save property check results in CountCondition The CountCondition class checks each property in its index against some condition. Save the result of each of those checks in the 2nd tuple element of the storage entry for that property so that other code may access it. Tested: Build and run unit tests Change-Id: Ie99f02062c28d003e588a43bf042ecd2834ad9b2 Signed-off-by: Matt Spinler --- src/count.hpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/count.hpp') diff --git a/src/count.hpp b/src/count.hpp index 0ac6420..bde8a91 100644 --- a/src/count.hpp +++ b/src/count.hpp @@ -61,6 +61,8 @@ class CountCondition : public IndexedConditional [this](const auto & item) // *INDENT-OFF* { + //Get the property value from storage[0], + //and save the op result in storage[1]. const auto& storage = std::get<2>( item.second); // Don't count properties that don't exist. @@ -70,7 +72,11 @@ class CountCondition : public IndexedConditional } const auto& value = any_ns::any_cast( std::get<0>(storage.get())); - return propertyOp(value); + auto r = propertyOp(value); + + std::get<1>(storage.get()) = r; + + return r; }); // *INDENT-ON* -- cgit v1.2.1