diff --git a/ZCppMain/ZMainHead.H b/ZCppMain/ZMainHead.H index a40cfda..67d43e5 100644 --- a/ZCppMain/ZMainHead.H +++ b/ZCppMain/ZMainHead.H @@ -5498,13 +5498,16 @@ namespace ZNsMain ZtCBaseList& operator=(const ZtCBaseList& rhs) { + // 초기에 DeleteAll() 로 다 삭제하고 필요한 만큼 AddTail() + // 을 호출하고 있는데, 최적화의 여지가 있다. + if(this==&rhs) return *this; this->DeleteAll(); ZCLink* VP_NowLink = rhs.mp_HeadLink ; __for0(TypeSize, i, rhs.size()) { - this->AddHead(VP_NowLink->mo_Data) ; + this->AddTail(VP_NowLink->mo_Data) ; VP_NowLink = VP_NowLink->mp_NextLink; }/*