diff options
author | fanquake <fanquake@gmail.com> | 2019-08-21 09:49:21 +0800 |
---|---|---|
committer | fanquake <fanquake@gmail.com> | 2019-08-22 13:43:47 +0800 |
commit | 153d9dd9acffa95bb97a4b1579bd20237fdc9c52 (patch) | |
tree | e82ddcae3ed96ab536f681ed968fb432c32cb320 /src/qt/addresstablemodel.cpp | |
parent | 59373e3e94015316bcaa03a7b9c2e6f442641720 (diff) |
refactor: replace qLowerBound & qUpperBound with std:: upper_bound & lower_bound
Diffstat (limited to 'src/qt/addresstablemodel.cpp')
-rw-r--r-- | src/qt/addresstablemodel.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/qt/addresstablemodel.cpp b/src/qt/addresstablemodel.cpp index a402500d73..131cceccbe 100644 --- a/src/qt/addresstablemodel.cpp +++ b/src/qt/addresstablemodel.cpp @@ -88,7 +88,7 @@ public: QString::fromStdString(EncodeDestination(address.dest)))); } } - // qLowerBound() and qUpperBound() require our cachedAddressTable list to be sorted in asc order + // std::lower_bound() and std::upper_bound() require our cachedAddressTable list to be sorted in asc order // Even though the map is already sorted this re-sorting step is needed because the originating map // is sorted by binary address, not by base58() address. std::sort(cachedAddressTable.begin(), cachedAddressTable.end(), AddressTableEntryLessThan()); @@ -97,9 +97,9 @@ public: void updateEntry(const QString &address, const QString &label, bool isMine, const QString &purpose, int status) { // Find address / label in model - QList<AddressTableEntry>::iterator lower = qLowerBound( + QList<AddressTableEntry>::iterator lower = std::lower_bound( cachedAddressTable.begin(), cachedAddressTable.end(), address, AddressTableEntryLessThan()); - QList<AddressTableEntry>::iterator upper = qUpperBound( + QList<AddressTableEntry>::iterator upper = std::upper_bound( cachedAddressTable.begin(), cachedAddressTable.end(), address, AddressTableEntryLessThan()); int lowerIndex = (lower - cachedAddressTable.begin()); int upperIndex = (upper - cachedAddressTable.begin()); |