diff options
author | Suhas Daftuar <sdaftuar@gmail.com> | 2017-12-07 09:57:53 -0500 |
---|---|---|
committer | Suhas Daftuar <sdaftuar@gmail.com> | 2017-12-07 10:06:38 -0500 |
commit | 1ec0c0a01c316146434642ab2f14a7367306dbec (patch) | |
tree | 78f46d62f63666c09b7ffc6bc6717e699ee27636 /src/miner.h | |
parent | 7630a1fe9a4c9a38b47fe385afb8d8a1902870d6 (diff) |
Make boost::multi_index comparators const
This fixes compatibility with boost 1.66
Diffstat (limited to 'src/miner.h')
-rw-r--r-- | src/miner.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/miner.h b/src/miner.h index 36276dc362..d81ec6421c 100644 --- a/src/miner.h +++ b/src/miner.h @@ -71,7 +71,7 @@ struct modifiedentry_iter { // except operating on CTxMemPoolModifiedEntry. // TODO: refactor to avoid duplication of this logic. struct CompareModifiedEntry { - bool operator()(const CTxMemPoolModifiedEntry &a, const CTxMemPoolModifiedEntry &b) + bool operator()(const CTxMemPoolModifiedEntry &a, const CTxMemPoolModifiedEntry &b) const { double f1 = (double)a.nModFeesWithAncestors * b.nSizeWithAncestors; double f2 = (double)b.nModFeesWithAncestors * a.nSizeWithAncestors; @@ -86,7 +86,7 @@ struct CompareModifiedEntry { // This is sufficient to sort an ancestor package in an order that is valid // to appear in a block. struct CompareTxIterByAncestorCount { - bool operator()(const CTxMemPool::txiter &a, const CTxMemPool::txiter &b) + bool operator()(const CTxMemPool::txiter &a, const CTxMemPool::txiter &b) const { if (a->GetCountWithAncestors() != b->GetCountWithAncestors()) return a->GetCountWithAncestors() < b->GetCountWithAncestors(); |