MCPcopy Create free account
hub / github.com/bulletphysics/bullet3 / TransferTo

Method TransferTo

examples/ThirdPartyLibs/tinyxml2/tinyxml2.cpp:142–165  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

140}
141
142void StrPair::TransferTo(StrPair* other)
143{
144 if (this == other)
145 {
146 return;
147 }
148 // This in effect implements the assignment operator by "moving"
149 // ownership (as in auto_ptr).
150
151 TIXMLASSERT(other != 0);
152 TIXMLASSERT(other->_flags == 0);
153 TIXMLASSERT(other->_start == 0);
154 TIXMLASSERT(other->_end == 0);
155
156 other->Reset();
157
158 other->_flags = _flags;
159 other->_start = _start;
160 other->_end = _end;
161
162 _flags = 0;
163 _start = 0;
164 _end = 0;
165}
166
167void StrPair::Reset()
168{

Callers 1

ParseDeepMethod · 0.80

Calls 1

ResetMethod · 0.45

Tested by

no test coverage detected