cryptonote: Add const-qualifier on comparison functor

The original code did not compile with GCC 8.2.1 in C++17 mode, since
comparison functions for std::set's must be invocable as const.
This commit is contained in:
Tom Smeding 2019-02-01 15:02:39 +01:00
parent 5d2fdc2e8c
commit 9bf0e53751

View File

@ -61,7 +61,7 @@ namespace cryptonote
class txCompare
{
public:
bool operator()(const tx_by_fee_and_receive_time_entry& a, const tx_by_fee_and_receive_time_entry& b)
bool operator()(const tx_by_fee_and_receive_time_entry& a, const tx_by_fee_and_receive_time_entry& b) const
{
// sort by greatest first, not least
if (a.first.first > b.first.first) return true;