Set from another ByteVector. The other is typically a segment which does not own the memory, ie: v1.set(v2.segment()) The other is not a reference because the result of segment() is not a variable to which the reference operator can be applied. This is not really needed any more because the refcnts take care of these cases.
| 295 | // the reference operator can be applied. |
| 296 | // This is not really needed any more because the refcnts take care of these cases. |
| 297 | void set(ByteVector other) // That's right. No ampersand. |
| 298 | { |
| 299 | #if BYTEVECTOR_REFCNT |
| 300 | // Its ok, everything will work. |
| 301 | dup(other); |
| 302 | #else |
| 303 | BVASSERT(other.mData == NULL); // Dont use set() in this case. |
| 304 | clear(); |
| 305 | mStart=other.mStart; mEnd=other.mEnd; mAllocEnd = other.mAllocEnd; mBitInd = other.mBitInd; |
| 306 | #endif |
| 307 | } |
| 308 | |
| 309 | // Bit aligned operations. |
| 310 | // The "2" suffix versions specify both byte and bit index in the range 0..7. |
no outgoing calls
no test coverage detected