MCPcopy Create free account
hub / github.com/comaps/comaps / Create

Method Create

libs/coding/fixed_bits_ddvector.hpp:79–89  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

77
78public:
79 static std::unique_ptr<TSelf> Create(TReader const & reader)
80 {
81 TSize const size = ReadPrimitiveFromPos<TSize>(reader, 0);
82
83 uint64_t const off1 = sizeof(TSize);
84 uint64_t const off2 = AlignBytesCount((size * Bits + CHAR_BIT - 1) / CHAR_BIT) + off1;
85
86 // We cannot use make_unique here because contsructor is private.
87 return std::unique_ptr<TSelf>(
88 new TSelf(reader.SubReader(off1, off2 - off1), reader.SubReader(off2, reader.Size() - off2), size));
89 }
90
91 bool Get(TSize index, TValue & value) const
92 {

Callers

nothing calls this directly

Calls 2

SubReaderMethod · 0.45
SizeMethod · 0.45

Tested by

no test coverage detected