MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / takeOwnership

Method takeOwnership

src/common/classes/GenericMap.h:166–188  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

164 }
165
166 void takeOwnership(GenericMap& from)
167 {
168 fb_assert(this != &from);
169
170 clear();
171
172 tree = from.tree;
173 mCount = from.mCount;
174
175 TreeAccessor treeAccessor(&from.tree);
176
177 if (treeAccessor.getFirst())
178 {
179 while (true)
180 {
181 bool haveMore = treeAccessor.fastRemove();
182 if (!haveMore)
183 break;
184 }
185 }
186
187 from.mCount = 0;
188 }
189
190 // Clear the map
191 void clear()

Callers

nothing calls this directly

Calls 3

clearClass · 0.50
getFirstMethod · 0.45
fastRemoveMethod · 0.45

Tested by

no test coverage detected