X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Flibr2c2%2Fblockallocator.cpp;h=39550394b2ac5c0cc0fa6aada82170a49590025d;hb=298bb0b8b0d2578b34d171a93da75c049e2b6efb;hp=429e19f31db95a3e4f827cc049079ad162ca6803;hpb=8d13f6fea658c3c69cf235953c9a2f23de6a8814;p=r2c2.git diff --git a/source/libr2c2/blockallocator.cpp b/source/libr2c2/blockallocator.cpp index 429e19f..3955039 100644 --- a/source/libr2c2/blockallocator.cpp +++ b/source/libr2c2/blockallocator.cpp @@ -92,7 +92,7 @@ const BlockIter &BlockAllocator::last_current() const 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; @@ -100,12 +100,13 @@ const BlockIter &BlockAllocator::iter_for(const Block &block) const 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()