MCPcopy Create free account
hub / github.com/Project-OSRM/osrm-backend / resize

Method resize

include/util/packed_vector.hpp:493–498  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

491 std::size_t size() const { return num_elements; }
492
493 void resize(std::size_t elements)
494 {
495 num_elements = elements;
496 auto num_blocks = (elements + BLOCK_ELEMENTS - 1) / BLOCK_ELEMENTS;
497 vec.resize(num_blocks * BLOCK_WORDS + 1);
498 }
499
500 std::size_t capacity() const { return (vec.capacity() / BLOCK_WORDS) * BLOCK_ELEMENTS; }
501

Callers 1

allocate_blocksMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected