/* Searches for an element in the buffer using the given scheme */ private int search(CompareFlits compare) { int win = 0; if (buffer.Count == 0) { return(-1); } for (int i = 1; i < buffer.Count; i++) { if (0 < compare(buffer[win], buffer[i])) { win = i; } } return(win); }
/* Searches for an element in the buffer using the given scheme */ private int search(CompareFlits compare) { int win = 0; if (buffer.Count == 0) return -1; for(int i = 1; i < buffer.Count; i++) if(0 < compare(buffer[win], buffer[i])) win = i; return win; }