Fix comparison function signature
This commit fixes build on CentOS 7 with GCC 4.8.5 Github-Pull: #17634 Rebased-From: b66861e2e5e8a49e11e7489cf22c3007bc7082cc
This commit is contained in:
parent
eac49073eb
commit
b8101fb7ac
2 changed files with 5 additions and 6 deletions
|
@ -11,8 +11,7 @@
|
||||||
#include <clientversion.h>
|
#include <clientversion.h>
|
||||||
#include <streams.h>
|
#include <streams.h>
|
||||||
|
|
||||||
#include <algorithm>
|
#include <utility>
|
||||||
|
|
||||||
|
|
||||||
RecentRequestsTableModel::RecentRequestsTableModel(WalletModel *parent) :
|
RecentRequestsTableModel::RecentRequestsTableModel(WalletModel *parent) :
|
||||||
QAbstractTableModel(parent), walletModel(parent)
|
QAbstractTableModel(parent), walletModel(parent)
|
||||||
|
@ -213,10 +212,10 @@ void RecentRequestsTableModel::updateDisplayUnit()
|
||||||
updateAmountColumnTitle();
|
updateAmountColumnTitle();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool RecentRequestEntryLessThan::operator()(RecentRequestEntry &left, RecentRequestEntry &right) const
|
bool RecentRequestEntryLessThan::operator()(const RecentRequestEntry& left, const RecentRequestEntry& right) const
|
||||||
{
|
{
|
||||||
RecentRequestEntry *pLeft = &left;
|
const RecentRequestEntry* pLeft = &left;
|
||||||
RecentRequestEntry *pRight = &right;
|
const RecentRequestEntry* pRight = &right;
|
||||||
if (order == Qt::DescendingOrder)
|
if (order == Qt::DescendingOrder)
|
||||||
std::swap(pLeft, pRight);
|
std::swap(pLeft, pRight);
|
||||||
|
|
||||||
|
|
|
@ -43,7 +43,7 @@ class RecentRequestEntryLessThan
|
||||||
public:
|
public:
|
||||||
RecentRequestEntryLessThan(int nColumn, Qt::SortOrder fOrder):
|
RecentRequestEntryLessThan(int nColumn, Qt::SortOrder fOrder):
|
||||||
column(nColumn), order(fOrder) {}
|
column(nColumn), order(fOrder) {}
|
||||||
bool operator()(RecentRequestEntry &left, RecentRequestEntry &right) const;
|
bool operator()(const RecentRequestEntry& left, const RecentRequestEntry& right) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
int column;
|
int column;
|
||||||
|
|
Loading…
Reference in a new issue