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

Method Peek

library/cpp/json/rapidjson_helpers.h:30–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

28
29 struct TInputStreamWrapper: TReadOnlyStreamBase {
30 Ch Peek() const {
31 if (!Eof) {
32 if (Pos >= Sz) {
33 if (Sz < BUF_SIZE) {
34 Sz += Helper.Read(Buf + Sz, BUF_SIZE - Sz);
35 } else {
36 Sz = Helper.Read(Buf, BUF_SIZE);
37 Pos = 0;
38 }
39 }
40
41 if (Pos < Sz) {
42 return Buf[Pos];
43 }
44 }
45
46 Eof = true;
47 return 0;
48 }
49
50 Ch Take() {
51 auto c = Peek();

Callers

nothing calls this directly

Calls 1

ReadMethod · 0.45

Tested by

no test coverage detected