equal
deleted
inserted
replaced
444 IIter clit = _find(m[comp]); |
444 IIter clit = _find(m[comp]); |
445 |
445 |
446 if (lai == clit) |
446 if (lai == clit) |
447 return false; |
447 return false; |
448 |
448 |
449 ItemList &c = *clit->my_class; |
449 ItemList &cl = *clit->my_class, |
|
450 &al = *lai->my_class; |
450 |
451 |
451 bool is_leader = (lai == ai); |
452 bool is_leader = (lai == ai); |
452 bool singleton = false; |
453 bool singleton = false; |
453 |
454 |
454 if (is_leader) { |
455 if (is_leader) { |
455 ++lai; |
456 ++lai; |
456 } |
457 } |
457 |
458 |
458 c.splice(c.end(), *lai->my_class, ai); |
459 cl.splice(cl.end(), al, ai); |
459 |
460 |
460 if (is_leader) { |
461 if (is_leader) { |
461 if (ai->size == 1) { |
462 if (ai->size == 1) { |
462 classes.erase(ai->my_class); |
463 classes.erase(ai->my_class); |
463 singleton = true; |
464 singleton = true; |
466 lai->size = ai->size; |
467 lai->size = ai->size; |
467 lai->my_class = ai->my_class; |
468 lai->my_class = ai->my_class; |
468 } |
469 } |
469 } |
470 } |
470 if (!singleton) { |
471 if (!singleton) { |
471 for (IIter i = lai; i != lai->my_class->end(); ++i) |
472 for (IIter i = lai; i != al.end(); ++i) |
472 i->parent = lai; |
473 i->parent = lai; |
473 --lai->size; |
474 --lai->size; |
474 } |
475 } |
475 |
476 |
476 ai->parent = clit; |
477 ai->parent = clit; |