diff --git a/hoot-core/src/main/cpp/hoot/core/criterion/ArbitraryCriterion.h b/hoot-core/src/main/cpp/hoot/core/criterion/ArbitraryCriterion.h
index 94d48be..97f16e1 100644
--- a/hoot-core/src/main/cpp/hoot/core/criterion/ArbitraryCriterion.h
+++ b/hoot-core/src/main/cpp/hoot/core/criterion/ArbitraryCriterion.h
@@ -22,7 +22,7 @@
* This will properly maintain the copyright information. DigitalGlobe
* copyrights will be updated automatically.
*
- * @copyright Copyright (C) 2016, 2017, 2018, 2019 DigitalGlobe (http://www.digitalglobe.com/)
+ * @copyright Copyright (C) 2016, 2017, 2018, 2019, 2020 DigitalGlobe (http://www.digitalglobe.com/)
*/
#ifndef ARBITRARYCRITERION_H
#define ARBITRARYCRITERION_H
@@ -30,6 +30,7 @@
// hoot
#include <hoot/core/elements/Element.h>
#include <hoot/core/criterion/ElementCriterion.h>
+#include <hoot/core/util/Log.h>
// Qt
#include <QString>
@@ -46,9 +47,6 @@ public:
static std::string className() { return "hoot::ArbitraryCriterion"; }
- // Do something like:
- // std::function<bool (ConstElementPtr e)> f =
- // std::bind(&ScriptMatchVisitor::isMatchCandidate, this, std::placeholders::_1);
explicit ArbitraryCriterion(std::function<bool (ConstElementPtr e)> f)
{
_f = f;
@@ -59,9 +57,11 @@ public:
_f = f;
}
- virtual bool isSatisfied(const std::shared_ptr<const Element> &e) const
+ virtual bool isSatisfied(const std::shared_ptr<const Element>& e) const
{
- return _f(e);
+ const bool result = _f(e);
+ LOG_VART(result);
+ return result;
}
virtual ElementCriterionPtr clone() { return ElementCriterionPtr(new ArbitraryCriterion(_f)); }
@@ -73,7 +73,7 @@ public:
private:
- std::function<bool (const std::shared_ptr<const Element> &e)> _f;
+ std::function<bool (const std::shared_ptr<const Element>& e)> _f;
};
}