diff --git a/src/impl/collection_change_builder.cpp b/src/impl/collection_change_builder.cpp index da0ff5ab..82d44e46 100644 --- a/src/impl/collection_change_builder.cpp +++ b/src/impl/collection_change_builder.cpp @@ -20,6 +20,8 @@ #include +#include + using namespace realm; using namespace realm::_impl; @@ -49,7 +51,7 @@ void CollectionChangeBuilder::merge(CollectionChangeBuilder&& c) // First update any old moves if (!c.moves.empty() || !c.deletions.empty() || !c.insertions.empty()) { - auto it = remove_if(begin(moves), end(moves), [&](auto& old) { + auto it = std::remove_if(begin(moves), end(moves), [&](auto& old) { // Check if the moved row was moved again, and if so just update the destination auto it = find_if(begin(c.moves), end(c.moves), [&](auto const& m) { return old.to == m.from; @@ -79,7 +81,7 @@ void CollectionChangeBuilder::merge(CollectionChangeBuilder&& c) // Ignore new moves of rows which were previously inserted (the implicit // delete from the move will remove the insert) if (!insertions.empty() && !c.moves.empty()) { - c.moves.erase(remove_if(begin(c.moves), end(c.moves), + c.moves.erase(std::remove_if(begin(c.moves), end(c.moves), [&](auto const& m) { return insertions.contains(m.from); }), end(c.moves)); } @@ -124,7 +126,7 @@ void CollectionChangeBuilder::clean_up_stale_moves() // Look for moves which are now no-ops, and remove them plus the associated // insert+delete. Note that this isn't just checking for from == to due to // that rows can also be shifted by other inserts and deletes - moves.erase(remove_if(begin(moves), end(moves), [&](auto const& move) { + moves.erase(std::remove_if(begin(moves), end(moves), [&](auto const& move) { if (move.from - deletions.count(0, move.from) != move.to - insertions.count(0, move.to)) return false; deletions.remove(move.from); diff --git a/src/results.cpp b/src/results.cpp index 7f268d12..e46b6663 100644 --- a/src/results.cpp +++ b/src/results.cpp @@ -446,7 +446,7 @@ Query Results::get_query() const // The TableView has no associated query so create one with no conditions that is restricted // to the rows in the TableView. m_table_view.sync_if_needed(); - return Query(*m_table, std::make_unique(m_table_view)); + return Query(*m_table, std::unique_ptr(new TableView(m_table_view))); } case Mode::LinkView: return m_table->where(m_link_view);