model_server/gala/src/controlObjects.cxx
//--------------------------------------------------------------------------------------------------------
// returns the index of last recently used cell or -1 if image buffer is empty.
//--------------------------------------------------------------------------------------------------------                
returns the index of last recently used cell or -1 if image buffer is empty.
returns the index of last recently used cell or - 1 if image buffer is empty .
int imageBuffer::findLRUCell(void) {
		register i;
		unsigned int minRef=32000;
		int minIndex;
		for(i=0;i<m_bufSize;i++) {
			if(m_Buffer[i]!=NULL && m_Buffer[i]->m_refCount<minRef) {
				minRef=m_Buffer[i]->m_refCount;
				minIndex=i;
			}
		}
		return minIndex;
	}
int imageBuffer :: findLRUCell ( void ) { register i ; unsigned int minRef = 32000 ; int minIndex ; for ( i = 0 ; i < m_bufSize ; i ++ ) { if ( m_Buffer [ i ] != NULL && m_Buffer [ i ] -> m_refCount < minRef ) { minRef = m_Buffer [ i ] -> m_refCount ; minIndex = i ; } } return minIndex ; }
returns the index of last recently used cell or -1 if image buffer is empty.
returns the index of last recently used cell or - 1 if image buffer is empty .