Changeset 1041 for branches/Carsten_PtrWork2/Source/System/FieldContainer/Fields/OSGMChildFCPointerField.inl
- Timestamp:
- 01/24/08 15:11:54 (1 year ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/Carsten_PtrWork2/Source/System/FieldContainer/Fields/OSGMChildFCPointerField.inl
r1032 r1041 996 996 UInt32 uiSyncInfo, AspectOffsetStore &oOffsets ) 997 997 { 998 if(source.size() > 0) 998 UInt32 oldSize = this ->size(); 999 UInt32 newSize = source. size(); 1000 1001 if(newSize > 0) 999 1002 { 1000 resize(source.size()); 1003 if(newSize < oldSize) 1004 { 1005 StorageIter oI = this->editRawStorage().begin() + newSize; 1006 StorageIter oE = this->editRawStorage().end (); 1007 1008 for(; oI != oE; ++oI) 1009 { 1010 decRefCount(*oI); 1011 } 1012 } 1001 1013 1014 this->editRawStorage().resize(newSize); 1015 1002 1016 StorageConstIter sI = source.getRawStorage ().begin(); 1003 StorageConstIter sE = source.getRawStorage (). begin();1017 StorageConstIter sE = source.getRawStorage ().end (); 1004 1018 1005 1019 StorageIter tI = this ->editRawStorage().begin(); … … 1007 1021 for(; sI != sE; ++sI, ++tI) 1008 1022 { 1009 *tI = convertToCurrentAspect(*sI); 1010 incRefCount(*tI); 1011 linkParent (*tI); 1023 ValueType newVal = convertToCurrentAspect(*sI); 1024 1025 incRefCount(newVal); 1026 decRefCount(*tI ); 1027 1028 *tI = newVal; 1029 1030 FINFO(("MChildFCPointerField<>::syncWith: sI [%p] tI [%p]\n", 1031 *sI, *tI)); 1012 1032 } 1013 1033 }
