MCPcopy Create free account
hub / github.com/cppcheck-opensource/cppcheck / TransferTo

Method TransferTo

externals/tinyxml2/tinyxml2.cpp:158–180  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

156
157
158void StrPair::TransferTo( StrPair* other )
159{
160 if ( this == other ) {
161 return;
162 }
163 // This in effect implements the assignment operator by "moving"
164 // ownership (as in auto_ptr).
165
166 TIXMLASSERT( other != 0 );
167 TIXMLASSERT( other->_flags == 0 );
168 TIXMLASSERT( other->_start == 0 );
169 TIXMLASSERT( other->_end == 0 );
170
171 other->Reset();
172
173 other->_flags = _flags;
174 other->_start = _start;
175 other->_end = _end;
176
177 _flags = 0;
178 _start = 0;
179 _end = 0;
180}
181
182
183void StrPair::Reset()

Callers 1

ParseDeepMethod · 0.80

Calls 1

ResetMethod · 0.80

Tested by

no test coverage detected