blob: 59c42840c3709eb50bbd9b236676225fc14c460c (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "vector_buffer_writer.h"
namespace search::test {
VectorBufferWriter::VectorBufferWriter()
: BufferWriter()
{
setup(tmp, 1024);
}
VectorBufferWriter::~VectorBufferWriter() = default;
void
VectorBufferWriter::flush()
{
for (size_t i = 0; i < usedLen(); ++i) {
output.push_back(tmp[i]);
}
rewind();
}
}
|