BlockPtr Flow::getBlockWithAddr(unsigned long long addr) { BlockPtr b; std::set<BlockPtr>::iterator it = this->blocks.begin(); std::set<BlockPtr>::iterator e = this->blocks.end(); while( it != e ) { BlockPtr n = *it; if( n->getBlockBase() <= addr && n->getBlockEnd() > addr ) { b = n; break; } ++it; } return b; }