MCPcopy Create free account
hub / github.com/PlotJuggler/PlotJuggler / ensureSize

Method ensureSize

pj_datastore/src/buffer.cpp:68–76  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

66}
67
68void BitVector::ensureSize(std::size_t num_bits) {
69 if (num_bits > bit_count_) {
70 bit_count_ = num_bits;
71 }
72 const std::size_t needed = bytesForBits(num_bits);
73 if (bytes_.size() < needed) {
74 bytes_.resize(needed);
75 }
76}
77
78void BitVector::setValid(std::size_t bit_index) {
79 bytes_[bit_index / 8] |= static_cast<uint8_t>(1u << (bit_index % 8));

Callers 6

appendFixedMethod · 0.80
appendStringMethod · 0.80
appendNullMethod · 0.80
appendFixedBulkMethod · 0.80
appendStringsBulkMethod · 0.80
appendValidityBulkMethod · 0.80

Calls 2

sizeMethod · 0.45
resizeMethod · 0.45

Tested by

no test coverage detected