MCPcopy Create free account
hub / github.com/FreeCAD/FreeCAD / readBytes

Method readBytes

src/Base/InputSource.cpp:199–212  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

197}
198
199XMLSize_t StdInputStream::readBytes(XMLByte* const toFill, const XMLSize_t maxToRead)
200{
201 //
202 // Read up to the maximum bytes requested. We return the number
203 // actually read.
204 //
205 // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
206 stream.read(reinterpret_cast<char*>(toFill), static_cast<std::streamsize>(maxToRead));
207 std::streamsize len = stream.gcount();
208
209 codec->validateBytes(toFill, len);
210
211 return static_cast<XMLSize_t>(len);
212}
213
214
215// ---------------------------------------------------------------------------

Callers 1

TESTFunction · 0.45

Calls 2

validateBytesMethod · 0.80
readMethod · 0.45

Tested by

no test coverage detected