diff --git a/hoot-core/src/main/cpp/hoot/core/criterion/ElementInIdListCriterion.cpp b/hoot-core/src/main/cpp/hoot/core/criterion/ElementInIdListCriterion.cpp
index 6d54d54..fb57fc8 100644
--- a/hoot-core/src/main/cpp/hoot/core/criterion/ElementInIdListCriterion.cpp
+++ b/hoot-core/src/main/cpp/hoot/core/criterion/ElementInIdListCriterion.cpp
@@ -22,7 +22,7 @@
* This will properly maintain the copyright information. DigitalGlobe
* copyrights will be updated automatically.
*
- * @copyright Copyright (C) 2018 DigitalGlobe (http://www.digitalglobe.com/)
+ * @copyright Copyright (C) 2018, 2019, 2020 DigitalGlobe (http://www.digitalglobe.com/)
*/
#include "ElementInIdListCriterion.h"
@@ -36,7 +36,16 @@ namespace hoot
HOOT_FACTORY_REGISTER(ElementCriterion, ElementInIdListCriterion)
-ElementInIdListCriterion::ElementInIdListCriterion(const std::vector<long>& ids)
+ElementInIdListCriterion::ElementInIdListCriterion(const ElementType& elementType,
+ const std::vector<long>& ids)
+{
+ for (uint i = 0; i < ids.size(); i++)
+ {
+ _ids.insert(ElementId(elementType, ids[i]));
+ }
+}
+
+ElementInIdListCriterion::ElementInIdListCriterion(const std::vector<ElementId>& ids)
{
for (uint i = 0; i < ids.size(); i++)
{
@@ -46,7 +55,7 @@ ElementInIdListCriterion::ElementInIdListCriterion(const std::vector<long>& ids)
bool ElementInIdListCriterion::isSatisfied(const ConstElementPtr& e) const
{
- return _ids.find(e->getId()) != _ids.end();
+ return _ids.find(e->getElementId()) != _ids.end();
}
}