| 197 | } |
| 198 | |
| 199 | XMLSize_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 | // --------------------------------------------------------------------------- |
no test coverage detected