Replace macro with for each loop.
...again, blasted newlines.
This commit is contained in:
@@ -22,10 +22,6 @@ for( set<elemType>::iterator var = (vect).begin(); var != (vect).end(); ++var )
|
||||
#define FOREACHS_CONST( elemType, vect, var ) \
|
||||
for( set<elemType>::const_iterator var = (vect).begin(); var != (vect).end(); ++var )
|
||||
|
||||
/** @brief General foreach loop iterating over a list, using a constant iterator. */
|
||||
#define FOREACHL_CONST( elemType, vect, var ) \
|
||||
for( list<elemType>::const_iterator var = (vect).begin(); var != (vect).end(); ++var )
|
||||
|
||||
/** @brief General foreach loop iterating over a map. */
|
||||
#define FOREACHM( keyType, valType, vect, var ) \
|
||||
for( map<keyType, valType>::iterator var = (vect).begin(); var != (vect).end(); ++var )
|
||||
|
||||
@@ -133,10 +133,8 @@ int64_t pos_map_queue::Search( int64_t iSourceFrame, bool *bApproximate ) const
|
||||
* it maps to. */
|
||||
int64_t iClosestPosition = 0, iClosestPositionDist = INT_MAX;
|
||||
const pos_map_t *pClosestBlock = &*m_pImpl->m_Queue.begin(); /* print only */
|
||||
FOREACHL_CONST( pos_map_t, m_pImpl->m_Queue, it )
|
||||
for (pos_map_t const &pm : m_pImpl->m_Queue)
|
||||
{
|
||||
const pos_map_t &pm = *it;
|
||||
|
||||
if( iSourceFrame >= pm.m_iSourceFrame &&
|
||||
iSourceFrame < pm.m_iSourceFrame+pm.m_iFrames )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user