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

Method xsgetn

dlib/vectorstream/vectorstream.h:125–138  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

123 }
124
125 std::streamsize xsgetn (
126 char* s,
127 std::streamsize n
128 )
129 {
130 if (read_pos < buffer.size())
131 {
132 const size_type num = std::min<size_type>(n, buffer.size()-read_pos);
133 std::memcpy(s, &buffer[read_pos], num);
134 read_pos += num;
135 return num;
136 }
137 return 0;
138 }
139
140 };
141

Callers

nothing calls this directly

Calls 2

memcpyFunction · 0.50
sizeMethod · 0.45

Tested by

no test coverage detected