MCPcopy Create free account
hub / github.com/davisking/dlib / pbackfail

Method pbackfail

dlib/vectorstream/vectorstream.h:108–123  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

106 }
107
108 int_type pbackfail(
109 int_type c
110 )
111 {
112 // if they are trying to push back a character that they didn't read last
113 // that is an error
114 const auto prev = read_pos-1;
115 if (c != EOF && prev < buffer.size() &&
116 c != static_cast<unsigned char>(buffer[prev]))
117 {
118 return EOF;
119 }
120
121 read_pos = prev;
122 return 1;
123 }
124
125 std::streamsize xsgetn (
126 char* s,

Callers

nothing calls this directly

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected