Skip to content

Commit

Permalink
used std::ranges::sort()
Browse files Browse the repository at this point in the history
  • Loading branch information
silverqx committed Dec 19, 2022
1 parent 57bdb02 commit 528be2b
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ TINY_SYSTEM_HEADER

#include <QtSql/QSqlRecord>

#include <range/v3/algorithm/sort.hpp>
#include <range/v3/view/set_algorithm.hpp>

#include "orm/exceptions/domainerror.hpp"
Expand Down Expand Up @@ -459,8 +458,8 @@ namespace Concerns
// Compute different keys, these keys will be detached
auto ids = idsFromRecords(idsWithAttributes);

ranges::sort(ids, {}, castKey);
ranges::sort(current, {}, castKey);
std::ranges::sort(ids, {}, castKey);
std::ranges::sort(current, {}, castKey);
auto detach =
ranges::views::set_difference(current, ids, {}, castKey, castKey) |
ranges::to<QVector<QVariant>>();
Expand Down

0 comments on commit 528be2b

Please sign in to comment.