diff options
author | Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> | 2019-11-29 20:15:45 +0200 |
---|---|---|
committer | Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> | 2019-11-29 21:11:00 +0200 |
commit | b66861e2e5e8a49e11e7489cf22c3007bc7082cc (patch) | |
tree | b71f238783d5cc15c554def9afe8988b43632da6 /src | |
parent | abb30de63f368c9875c3f2a4cfe91b1daf9412da (diff) |
Fix comparison function signature
This commit fixes build on CentOS 7 with GCC 4.8.5
Diffstat (limited to 'src')
-rw-r--r-- | src/qt/recentrequeststablemodel.cpp | 9 | ||||
-rw-r--r-- | src/qt/recentrequeststablemodel.h | 2 |
2 files changed, 5 insertions, 6 deletions
diff --git a/src/qt/recentrequeststablemodel.cpp b/src/qt/recentrequeststablemodel.cpp index 6d933f46d6..18fa5f417f 100644 --- a/src/qt/recentrequeststablemodel.cpp +++ b/src/qt/recentrequeststablemodel.cpp @@ -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); diff --git a/src/qt/recentrequeststablemodel.h b/src/qt/recentrequeststablemodel.h index 30578b7a03..f5085f7268 100644 --- a/src/qt/recentrequeststablemodel.h +++ b/src/qt/recentrequeststablemodel.h @@ -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; |