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

Method DoNext

util/stream/zerocopy_output_ut.cpp:17–25  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

15
16private:
17 size_t DoNext(void** ptr) override {
18 if (S_.size() == S_.capacity()) {
19 S_.reserve(FastClp2(S_.capacity() + 1));
20 }
21 size_t previousSize = S_.size();
22 S_.resize(S_.capacity());
23 *ptr = S_.begin() + previousSize;
24 return S_.size() - previousSize;
25 }
26
27 void DoUndo(size_t len) override {
28 Y_ENSURE(len <= S_.size());

Callers

nothing calls this directly

Calls 6

FastClp2Function · 0.85
sizeMethod · 0.45
capacityMethod · 0.45
reserveMethod · 0.45
resizeMethod · 0.45
beginMethod · 0.45

Tested by

no test coverage detected