Make a full memory copy of other. We clone only the filled in area, not the unused allocated area.
| 92 | // Make a full memory copy of other. |
| 93 | // We clone only the filled in area, not the unused allocated area. |
| 94 | void ByteVector::clone(const ByteVector &other) |
| 95 | { |
| 96 | clear(); |
| 97 | init(other.size()); |
| 98 | memcpy(mStart,other.mStart,other.size()); |
| 99 | } |
| 100 | |
| 101 | // Make this a copy of other. |
| 102 | // It it owns memory, share it using refcnts. |
no test coverage detected