adjust to use std::make_unique
@@ -10,6 +10,14 @@ namespace search::queryeval {
EmptySearch SourceBlenderSearch::_emptySearch;
+class SourceBlenderSearchNonStrict : public SourceBlenderSearch
+{
+public:
+ SourceBlenderSearchNonStrict(std::unique_ptr<Iterator> sourceSelector, const Children &children)
+ : SourceBlenderSearch(std::move(sourceSelector), children)
+ {}
+};
+
class SourceBlenderSearchStrict : public SourceBlenderSearch
{
public:
@@ -163,9 +171,9 @@ SourceBlenderSearch::create(std::unique_ptr<sourceselector::Iterator> sourceSele
const Children &children, bool strict)
{
if (strict) {
- return SearchIterator::UP(new SourceBlenderSearchStrict(std::move(sourceSelector), children));
+ return std::make_unique<SourceBlenderSearchStrict>(std::move(sourceSelector), children);
} else {
- return SearchIterator::UP(new SourceBlenderSearch(std::move(sourceSelector), children));
+ return std::make_unique<SourceBlenderSearchNonStrict>(std::move(sourceSelector), children);
}
}
