Make boost::multi_index comparators const
This commit is contained in:
@@ -73,7 +73,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;
|
||||
@@ -88,7 +88,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();
|
||||
|
||||
@@ -283,7 +283,7 @@ public:
|
||||
class CompareTxMemPoolEntryByAncestorFee
|
||||
{
|
||||
public:
|
||||
bool operator()(const CTxMemPoolEntry& a, const CTxMemPoolEntry& b)
|
||||
bool operator()(const CTxMemPoolEntry& a, const CTxMemPoolEntry& b) const
|
||||
{
|
||||
double aFees = a.GetModFeesWithAncestors();
|
||||
double aSize = a.GetSizeWithAncestors();
|
||||
|
||||
Reference in New Issue
Block a user