- Timestamp:
- 09/07/06 20:05:18 (2 years ago)
- Files:
-
- trunk/Universal/UniCon/State/AArray.d (added)
- trunk/Universal/UniCon/State/Vector.d (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/Universal/UniCon/State/Vector.d
r20 r21 27 27 read() 28 28 { 29 return new VectorHandler(_data);29 return new Handler(_data); 30 30 } 31 31 … … 34 34 { 35 35 T[] temp = _data; 36 T[] arrayCopy = new T[temp.length];37 arrayCopy[] = temp[];38 return new VectorHandler(arrayCopy);36 T[] copy = new T[temp.length]; 37 copy[] = temp[]; 38 return new Handler(copy); 39 39 } 40 40 41 41 void 42 store( IEditor array)43 { 44 _data = (cast( VectorHandler)array)._data;45 (cast(VectorHandler)array)._data= null;42 store(inout IEditor array) 43 { 44 _data = (cast(Handler)array)._data; 45 array = null; 46 46 } 47 47 … … 49 49 private: 50 50 51 static class VectorHandler : IReader, IEditor51 static class Handler : IReader, IEditor 52 52 { 53 53 /* fields */ … … 70 70 edit() 71 71 { 72 T[] arrayCopy = new T[_data.length];73 arrayCopy[] = _data[];74 return new Vector.VectorHandler(arrayCopy);72 T[] copy = new T[_data.length]; 73 copy[] = _data[]; 74 return new Handler(copy); 75 75 } 76 76
