summaryrefslogtreecommitdiffstats
path: root/src/count.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/count.hpp')
-rw-r--r--src/count.hpp8
1 files changed, 7 insertions, 1 deletions
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<T>(
std::get<0>(storage.get()));
- return propertyOp(value);
+ auto r = propertyOp(value);
+
+ std::get<1>(storage.get()) = r;
+
+ return r;
});
// *INDENT-ON*
OpenPOWER on IntegriCloud