MCPcopy Create free account
hub / github.com/catboost/catboost / DoNext

Method DoNext

util/stream/buffer.cpp:13–21  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11 virtual ~TImpl() = default;
12
13 inline size_t DoNext(void** ptr) {
14 if (Data_.Avail() == 0) {
15 Data_.Reserve(FastClp2(Data_.Capacity() + MinBufferGrowSize));
16 }
17 size_t previousSize = Data_.size();
18 Data_.Resize(Data_.Capacity());
19 *ptr = Data_.Begin() + previousSize;
20 return Data_.Size() - previousSize;
21 }
22
23 inline void DoUndo(size_t len) {
24 Y_ABORT_UNLESS(len <= Data_.Size(), "trying to undo more bytes than actually written");

Callers

nothing calls this directly

Calls 8

FastClp2Function · 0.85
AvailMethod · 0.45
ReserveMethod · 0.45
CapacityMethod · 0.45
sizeMethod · 0.45
ResizeMethod · 0.45
BeginMethod · 0.45
SizeMethod · 0.45

Tested by

no test coverage detected