MCPcopy Create free account
hub / github.com/danoon2/Boxedwine / powerOf2

Function powerOf2

source/util/bstring.cpp:60–68  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

58}
59
60int powerOf2(int requestedSize) {
61 int size = 1 << SMALLEST_LEVEL;
62 int powerOf2Size = SMALLEST_LEVEL;
63 while (size < requestedSize) {
64 size <<= 1;
65 powerOf2Size++;
66 }
67 return powerOf2Size;
68}
69
70void BStringData::decRefCount() {
71 if (refCount.fetch_sub(1, std::memory_order_acq_rel) == 1) {

Callers 6

substrMethod · 0.70
getLevelMethod · 0.70
operator+Method · 0.70
makeWritableMethod · 0.70
copyMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected