src/HumdrumFileBase.cpp
bool sortTokenPairsByLineIndex(const TokenPair& a, const TokenPair& b) {
	if (a.first->getLineIndex() < b.first->getLineIndex()) {
		return true;
	}
	if (a.first->getLineIndex() == b.first->getLineIndex()) {
		if (a.first->getFieldIndex() < b.first->getFieldIndex()) {
			return true;
		}
	}
	return false;
}
//////////////////////////////
//
// sortTokenParisByLineIndex -- Sort two tokens so that the one
//    on the smaller line is first.  If both are on the same line then
//    sort the left-most token first.
//
- Sort two tokens so that the one
on the smaller line is first.  If both are on the same line then
sort the left-most token first.
- Sort two tokens so that the one on the smaller line is first . If both are on the same line then sort the left - most token first .
bool sortTokenPairsByLineIndex(const TokenPair& a, const TokenPair& b) {
	if (a.first->getLineIndex() < b.first->getLineIndex()) {
		return true;
	}
	if (a.first->getLineIndex() == b.first->getLineIndex()) {
		if (a.first->getFieldIndex() < b.first->getFieldIndex()) {
			return true;
		}
	}
	return false;
}
bool sortTokenPairsByLineIndex ( const TokenPair & a , const TokenPair & b ) { if ( a . first -> getLineIndex ( ) < b . first -> getLineIndex ( ) ) { return true ; } if ( a . first -> getLineIndex ( ) == b . first -> getLineIndex ( ) ) { if ( a . first -> getFieldIndex ( ) < b . first -> getFieldIndex ( ) ) { return true ; } } return false ; }
sortTokenParisByLineIndex -- Sort two tokens so that the one
on the smaller line is first.
sortTokenParisByLineIndex -- Sort two tokens so that the one on the smaller line is first .