src/tool-musedata2hum.cpp
GridMeasure* Tool_musedata2hum::getMeasure(HumGrid& outdata, HumNum starttime) {
	for (int i=0; i<(int)outdata.size(); i++) {
		if (outdata[i]->getTimestamp() == starttime) {
			return outdata[i];
		}
	}
	// Did not find measure in data, so append to end of list.
	// Assuming that unknown measures are at a later timestamp
	// than those in current list, but should fix this later perhaps.
	GridMeasure* gm = new GridMeasure(&outdata);
	outdata.push_back(gm);
	return gm;
}
//////////////////////////////
//
// Tool_musedata2hum::getMeasure --  Could be imporoved by NlogN search.
//
:getMeasure --  Could be imporoved by NlogN search.
: getMeasure -- Could be imporoved by NlogN search .
GridMeasure* Tool_musedata2hum::getMeasure(HumGrid& outdata, HumNum starttime) {
	for (int i=0; i<(int)outdata.size(); i++) {
		if (outdata[i]->getTimestamp() == starttime) {
			return outdata[i];
		}
	}
	GridMeasure* gm = new GridMeasure(&outdata);
	outdata.push_back(gm);
	return gm;
}
GridMeasure * Tool_musedata2hum :: getMeasure ( HumGrid & outdata , HumNum starttime ) { for ( int i = 0 ; i < ( int ) outdata . size ( ) ; i ++ ) { if ( outdata [ i ] -> getTimestamp ( ) == starttime ) { return outdata [ i ] ; } } GridMeasure * gm = new GridMeasure ( & outdata ) ; outdata . push_back ( gm ) ; return gm ; }
Tool_musedata2hum::getMeasure --  Could be imporoved by NlogN search.
Tool_musedata2hum :: getMeasure -- Could be imporoved by NlogN search .
// Did not find measure in data, so append to end of list. // Assuming that unknown measures are at a later timestamp // than those in current list, but should fix this later perhaps.