|
10 | 10 | #include <key_io.h> |
11 | 11 | #include <wallet/wallet.h> |
12 | 12 |
|
| 13 | +#include <algorithm> |
| 14 | + |
13 | 15 | #include <QFont> |
14 | 16 | #include <QDebug> |
15 | 17 |
|
@@ -86,18 +88,18 @@ class AddressTablePriv |
86 | 88 | QString::fromStdString(EncodeDestination(address.dest)))); |
87 | 89 | } |
88 | 90 | } |
89 | | - // qLowerBound() and qUpperBound() require our cachedAddressTable list to be sorted in asc order |
| 91 | + // std::lower_bound() and std::upper_bound() require our cachedAddressTable list to be sorted in asc order |
90 | 92 | // Even though the map is already sorted this re-sorting step is needed because the originating map |
91 | 93 | // is sorted by binary address, not by base58() address. |
92 | | - qSort(cachedAddressTable.begin(), cachedAddressTable.end(), AddressTableEntryLessThan()); |
| 94 | + std::sort(cachedAddressTable.begin(), cachedAddressTable.end(), AddressTableEntryLessThan()); |
93 | 95 | } |
94 | 96 |
|
95 | 97 | void updateEntry(const QString &address, const QString &label, bool isMine, const QString &purpose, int status) |
96 | 98 | { |
97 | 99 | // Find address / label in model |
98 | | - QList<AddressTableEntry>::iterator lower = qLowerBound( |
| 100 | + QList<AddressTableEntry>::iterator lower = std::lower_bound( |
99 | 101 | cachedAddressTable.begin(), cachedAddressTable.end(), address, AddressTableEntryLessThan()); |
100 | | - QList<AddressTableEntry>::iterator upper = qUpperBound( |
| 102 | + QList<AddressTableEntry>::iterator upper = std::upper_bound( |
101 | 103 | cachedAddressTable.begin(), cachedAddressTable.end(), address, AddressTableEntryLessThan()); |
102 | 104 | int lowerIndex = (lower - cachedAddressTable.begin()); |
103 | 105 | int upperIndex = (upper - cachedAddressTable.begin()); |
|
0 commit comments