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

Method clear

src/common/classes/GenericMap.h:191–208  ·  view source on GitHub ↗

Clear the map

Source from the content-addressed store, hash-verified

189
190 // Clear the map
191 void clear()
192 {
193 TreeAccessor treeAccessor(&tree);
194
195 if (treeAccessor.getFirst())
196 {
197 while (true)
198 {
199 KeyValuePair* temp = treeAccessor.current();
200 bool haveMore = treeAccessor.fastRemove();
201 delete temp;
202 if (!haveMore)
203 break;
204 }
205 }
206
207 mCount = 0;
208 }
209
210 // Returns true if value existed
211 bool remove(const KeyType& key)

Callers

nothing calls this directly

Calls 3

getFirstMethod · 0.45
currentMethod · 0.45
fastRemoveMethod · 0.45

Tested by

no test coverage detected