diff options
| author | fanquake <[email protected]> | 2019-08-21 09:42:29 +0800 |
|---|---|---|
| committer | fanquake <[email protected]> | 2019-08-22 13:40:51 +0800 |
| commit | fea33cbbdfb4673033f3414bf1613591ff654aac (patch) | |
| tree | 88620a4ef6e61efef8ad313bdfcaa581289455f6 | |
| parent | Merge #16371: build: ignore macOS make deploy artefacts & add them to clean-l... (diff) | |
| download | discoin-fea33cbbdfb4673033f3414bf1613591ff654aac.tar.xz discoin-fea33cbbdfb4673033f3414bf1613591ff654aac.zip | |
refactor: replace qStableSort with std::stable_sort
| -rw-r--r-- | src/qt/bantablemodel.cpp | 4 | ||||
| -rw-r--r-- | src/qt/peertablemodel.cpp | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/src/qt/bantablemodel.cpp b/src/qt/bantablemodel.cpp index 8a6b205cd..efc726e09 100644 --- a/src/qt/bantablemodel.cpp +++ b/src/qt/bantablemodel.cpp @@ -10,6 +10,8 @@ #include <sync.h> #include <util/time.h> +#include <algorithm> + #include <QDebug> #include <QList> @@ -61,7 +63,7 @@ public: if (sortColumn >= 0) // sort cachedBanlist (use stable sort to prevent rows jumping around unnecessarily) - qStableSort(cachedBanlist.begin(), cachedBanlist.end(), BannedNodeLessThan(sortColumn, sortOrder)); + std::stable_sort(cachedBanlist.begin(), cachedBanlist.end(), BannedNodeLessThan(sortColumn, sortOrder)); } int size() const diff --git a/src/qt/peertablemodel.cpp b/src/qt/peertablemodel.cpp index 85b691c47..99a9a12fe 100644 --- a/src/qt/peertablemodel.cpp +++ b/src/qt/peertablemodel.cpp @@ -11,6 +11,8 @@ #include <interfaces/node.h> #include <sync.h> +#include <algorithm> + #include <QDebug> #include <QList> #include <QTimer> @@ -76,7 +78,7 @@ public: if (sortColumn >= 0) // sort cacheNodeStats (use stable sort to prevent rows jumping around unnecessarily) - qStableSort(cachedNodeStats.begin(), cachedNodeStats.end(), NodeLessThan(sortColumn, sortOrder)); + std::stable_sort(cachedNodeStats.begin(), cachedNodeStats.end(), NodeLessThan(sortColumn, sortOrder)); // build index map mapNodeRows.clear(); |