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

Method DoReadTo

util/stream/input.cpp:193–217  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

191 }
192
193 size_t DoReadTo(TString& st, char ch) override {
194 auto&& guard = Guard(M_);
195
196 (void)guard;
197
198 const auto r = getdelim(&B_, &L_, ch, F_);
199
200 if (r < 0) {
201 if (ferror(F_)) {
202 ythrow TSystemError() << "can not read from stdin";
203 }
204
205 st.clear();
206
207 return 0;
208 }
209
210 st.AssignNoAlias(B_, r);
211
212 if (st && st.back() == ch) {
213 st.pop_back();
214 }
215
216 return r;
217 }
218
219 TAdaptiveLock M_;
220 char* B_ = nullptr;

Callers

nothing calls this directly

Calls 4

GuardFunction · 0.85
clearMethod · 0.45
backMethod · 0.45
pop_backMethod · 0.45

Tested by

no test coverage detected