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

Method Append

libs/coding/text_storage.hpp:81–98  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

79 }
80
81 void Append(std::string_view sv)
82 {
83 ASSERT(!m_blocks.empty(), ());
84
85 ASSERT_LESS(m_pool.size(), m_blockSize, ());
86
87 ++m_blocks.back().m_subs;
88 m_pool.append(sv);
89 m_lengths.push_back(sv.size());
90
91 if (m_pool.size() >= m_blockSize)
92 {
93 FlushPool(m_lengths, m_pool);
94 m_pool.clear();
95 m_lengths.clear();
96 m_blocks.emplace_back(m_writer.Pos() - m_dataOffset /* offset */, 0 /* subs */);
97 }
98 }
99
100private:
101 struct Block

Callers 1

DumpStringsFunction · 0.45

Calls 9

ASSERTFunction · 0.85
backMethod · 0.80
emptyMethod · 0.45
sizeMethod · 0.45
appendMethod · 0.45
push_backMethod · 0.45
clearMethod · 0.45
emplace_backMethod · 0.45
PosMethod · 0.45

Tested by 1

DumpStringsFunction · 0.36