Fix comparison function signature

This commit fixes build on CentOS 7 with GCC 4.8.5
This commit is contained in:
Hennadii Stepanov committed 2019-11-29 21:11:00 +02:00
1 parent abb30de63f
commit b66861e2e5
2 files changed
+5 -6

No files matched your search

+4 -5
View File
@@ -12,8 +12,7 @@
#include <clientversion.h>
#include <streams.h>
#include <algorithm>
#include <utility>
RecentRequestsTableModel::RecentRequestsTableModel(WalletModel *parent) :
QAbstractTableModel(parent), walletModel(parent)
@@ -214,10 +213,10 @@ void RecentRequestsTableModel::updateDisplayUnit()
updateAmountColumnTitle();
}
bool RecentRequestEntryLessThan::operator()(RecentRequestEntry &left, RecentRequestEntry &right) const
bool RecentRequestEntryLessThan::operator()(const RecentRequestEntry& left, const RecentRequestEntry& right) const
{
RecentRequestEntry *pLeft = &left;
RecentRequestEntry *pRight = &right;
const RecentRequestEntry* pLeft = &left;
const RecentRequestEntry* pRight = &right;
if (order == Qt::DescendingOrder)
std::swap(pLeft, pRight);
+1 -1
View File
@@ -45,7 +45,7 @@ class RecentRequestEntryLessThan
public:
RecentRequestEntryLessThan(int nColumn, Qt::SortOrder fOrder):
column(nColumn), order(fOrder) {}
bool operator()(RecentRequestEntry &left, RecentRequestEntry &right) const;
bool operator()(const RecentRequestEntry& left, const RecentRequestEntry& right) const;
private:
int column;