HexEdit/Template.cpp
size_t CHexEditDoc::FindDffdEltAt(FILE_ADDRESS addr)
{
	int ii, end = df_address_.size();

	for (ii = 0; ii < end; ++ii)
	{
		if (df_type_[ii] > DF_DATA)
		{
			FILE_ADDRESS aa = df_address_[ii];
			if (addr >= aa && addr < aa + df_size_[ii])
				return ii;
		}
	}
	return end;  // not found
}
// Returns the (first) element that contains the passed address
// OR returns one past the last element if not found.
// [Note: This does a linear search but is very fast - it replaces
// find_address() (= binary search) which failed when JUMPs are used.]

Returns the (first) element that contains the passed address
OR returns one past the last element if not found.
[Note: This does a linear search but is very fast - it replaces
find_address() (= binary search) which failed when JUMPs are used.]
Returns the ( first ) element that contains the passed address OR returns one past the last element if not found . [ Note : This does a linear search but is very fast - it replaces find_address () ( = binary search ) which failed when JUMPs are used . ]
size_t CHexEditDoc::FindDffdEltAt(FILE_ADDRESS addr)
{
	int ii, end = df_address_.size();
	for (ii = 0; ii < end; ++ii)
	{
		if (df_type_[ii] > DF_DATA)
		{
			FILE_ADDRESS aa = df_address_[ii];
			if (addr >= aa && addr < aa + df_size_[ii])
				return ii;
		}
	}
	return end;  
}
size_t CHexEditDoc :: FindDffdEltAt ( FILE_ADDRESS addr ) { int ii , end = df_address_ . size ( ) ; for ( ii = 0 ; ii < end ; ++ ii ) { if ( df_type_ [ ii ] > DF_DATA ) { FILE_ADDRESS aa = df_address_ [ ii ] ; if ( addr >= aa && addr < aa + df_size_ [ ii ] ) return ii ; } } return end ; }
Returns the (first) element that contains the passed address
OR returns one past the last element if not found.
Returns the ( first ) element that contains the passed address OR returns one past the last element if not found .
// not found
