MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / removeAll

Function removeAll

source/test/btree_test.cpp:589–600  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

587}
588
589size_t removeAll(SimpleBTree& db, List<int> keys) {
590 size_t totalRemoved = 0;
591 Set<int> removed;
592 for (int k : keys) {
593 if (db.remove(k)) {
594 EXPECT_FALSE(removed.contains(k));
595 removed.add(k);
596 ++totalRemoved;
597 }
598 }
599 return totalRemoved;
600}
601
602void testBTree(size_t maxIndexSize, size_t maxLeafSize) {
603 srand(time(0));

Callers 1

testBTreeFunction · 0.70

Calls 3

removeMethod · 0.45
containsMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected