MCPcopy Create free account
hub / github.com/RangeNetworks/openbts / set

Method set

GPRS/ByteVector.h:297–307  ·  view source on GitHub ↗

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.

Source from the content-addressed store, hash-verified

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.

Callers 7

mtFinishSuccessMethod · 0.45
engineWriteHighSideMethod · 0.45
engineServiceMethod · 0.45
gprsTestMsgFunction · 0.45
gprsDebugFunction · 0.45
parseDLUnitDataBodyMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected