const BlockIter &BlockAllocator::iter_for(const Block &block) const
{
- BlockList::const_iterator i = find_if(blocks.begin(), blocks.end(), IterBlockMatch(block));
+ BlockList::const_iterator i = find_if(blocks.begin(), blocks.end(), BlockMatch(block));
if(i==blocks.end())
throw key_error(&block);
return *i;
bool BlockAllocator::has_block(const Block &block) const
{
- return find_if(blocks.begin(), blocks.end(), IterBlockMatch(block))!=blocks.end();
+ return find_if(blocks.begin(), blocks.end(), BlockMatch(block))!=blocks.end();
}
bool BlockAllocator::is_block_current(const Block &block) const
{
- return find_if(blocks.begin(), cur_blocks_end, IterBlockMatch(block))!=cur_blocks_end;
+ BlockList::const_iterator end = cur_blocks_end;
+ return find_if(blocks.begin(), end, BlockMatch(block))!=cur_blocks_end;
}
void BlockAllocator::reserve_more()