SegmentList SegmentList::clone() const { SegmentList dl; Segment* s = _first; for (int i = 0; i < _size; ++i) { Segment* ns = s->clone(); dl.push_back(ns); s = s->next(); } dl.check(); return dl; }