Refactored Map<>

This commit is contained in:
Pavel Kirienko
2015-05-16 03:31:18 +03:00
parent 24f0ec56f4
commit eb370b08dd
7 changed files with 46 additions and 46 deletions
@@ -165,13 +165,13 @@ TransferID* OutgoingTransferRegistry<NumStaticEntries>::accessOrCreate(const Out
template <int NumStaticEntries>
bool OutgoingTransferRegistry<NumStaticEntries>::exists(DataTypeID dtid, TransferType tt) const
{
return NULL != map_.findFirstKey(ExistenceCheckingPredicate(dtid, tt));
return NULL != map_.find(ExistenceCheckingPredicate(dtid, tt));
}
template <int NumStaticEntries>
void OutgoingTransferRegistry<NumStaticEntries>::cleanup(MonotonicTime ts)
{
map_.removeWhere(DeadlineExpiredPredicate(ts));
map_.removeAllWhere(DeadlineExpiredPredicate(ts));
}
}
@@ -179,7 +179,7 @@ public:
virtual ~TransferListener()
{
// Map must be cleared before bufmgr is destroyed
receivers_.removeAll();
receivers_.clear();
}
};