MCPcopy Create free account
hub / github.com/NativeScript/android / clear

Method clear

test-app/runtime/src/main/cpp/robin_hood.h:1682–1700  ·  view source on GitHub ↗

Clears all data, without resizing.

Source from the content-addressed store, hash-verified

1680
1681 // Clears all data, without resizing.
1682 void clear() {
1683 ROBIN_HOOD_TRACE(this)
1684 if (empty()) {
1685 // don't do anything! also important because we don't want to write to
1686 // DummyInfoByte::b, even though we would just write 0 to it.
1687 return;
1688 }
1689
1690 Destroyer<Self, IsFlat && std::is_trivially_destructible<Node>::value>{}.nodes(*this);
1691
1692 auto const numElementsWithBuffer = calcNumElementsWithBuffer(mMask + 1);
1693 // clear everything, then set the sentinel again
1694 uint8_t const z = 0;
1695 std::fill(mInfo, mInfo + calcNumBytesInfo(numElementsWithBuffer), z);
1696 mInfo[numElementsWithBuffer] = 1;
1697
1698 mInfoInc = InitialInfoInc;
1699 mInfoHashShift = InitialInfoHashShift;
1700 }
1701
1702 // Destroys the map and all it's contents.
1703 ~Table() {

Callers

nothing calls this directly

Calls 2

emptyFunction · 0.85
nodesMethod · 0.45

Tested by

no test coverage detected