mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-02 09:46:52 -05:00
refactor: replace qStableSort with std::stable_sort
This commit is contained in:
parent
8ee572f094
commit
fea33cbbdf
2 changed files with 6 additions and 2 deletions
|
@ -10,6 +10,8 @@
|
||||||
#include <sync.h>
|
#include <sync.h>
|
||||||
#include <util/time.h>
|
#include <util/time.h>
|
||||||
|
|
||||||
|
#include <algorithm>
|
||||||
|
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
#include <QList>
|
#include <QList>
|
||||||
|
|
||||||
|
@ -61,7 +63,7 @@ public:
|
||||||
|
|
||||||
if (sortColumn >= 0)
|
if (sortColumn >= 0)
|
||||||
// sort cachedBanlist (use stable sort to prevent rows jumping around unnecessarily)
|
// 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
|
int size() const
|
||||||
|
|
|
@ -11,6 +11,8 @@
|
||||||
#include <interfaces/node.h>
|
#include <interfaces/node.h>
|
||||||
#include <sync.h>
|
#include <sync.h>
|
||||||
|
|
||||||
|
#include <algorithm>
|
||||||
|
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
#include <QList>
|
#include <QList>
|
||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
|
@ -76,7 +78,7 @@ public:
|
||||||
|
|
||||||
if (sortColumn >= 0)
|
if (sortColumn >= 0)
|
||||||
// sort cacheNodeStats (use stable sort to prevent rows jumping around unnecessarily)
|
// 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
|
// build index map
|
||||||
mapNodeRows.clear();
|
mapNodeRows.clear();
|
||||||
|
|
Loading…
Add table
Reference in a new issue