src/list.c

changeset 776
874cc78cdffd
parent 764
ccbdbd088455
child 802
30473af255b4
equal deleted inserted replaced
775:d3f451440eef 776:874cc78cdffd
293 ((list->climpl != NULL ? list->climpl->compare : list->cl->compare) != 293 ((list->climpl != NULL ? list->climpl->compare : list->cl->compare) !=
294 (other->climpl != NULL ? other->climpl->compare : other->cl->compare)) 294 (other->climpl != NULL ? other->climpl->compare : other->cl->compare))
295 ) { 295 ) {
296 // lists are definitely different - cannot use internal compare function 296 // lists are definitely different - cannot use internal compare function
297 if (list->size == other->size) { 297 if (list->size == other->size) {
298 CxIterator left = cxListIterator(list); 298 CxIterator left = list->cl->iterator(list, 0, false);
299 CxIterator right = cxListIterator(other); 299 CxIterator right = other->cl->iterator(list, 0, false);
300 for (size_t i = 0; i < list->size; i++) { 300 for (size_t i = 0; i < list->size; i++) {
301 void *leftValue = cxIteratorCurrent(left); 301 void *leftValue = cxIteratorCurrent(left);
302 void *rightValue = cxIteratorCurrent(right); 302 void *rightValue = cxIteratorCurrent(right);
303 int d = list->cmpfunc(leftValue, rightValue); 303 int d = list->cmpfunc(leftValue, rightValue);
304 if (d != 0) { 304 if (d != 0) {

mercurial