MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / SkipBytes

Method SkipBytes

src/random_access_file.cpp:163–172  ·  view source on GitHub ↗

* Skip \a n bytes ahead in the file. * @param n Number of bytes to skip reading. */

Source from the content-addressed store, hash-verified

161 * @param n Number of bytes to skip reading.
162 */
163void RandomAccessFile::SkipBytes(size_t n)
164{
165 assert(this->buffer_end >= this->buffer);
166 size_t remaining = this->buffer_end - this->buffer;
167 if (n <= remaining) {
168 this->buffer += n;
169 } else {
170 this->SeekTo(n, SEEK_CUR);
171 }
172}

Callers 15

LoadNewGRFFileFromFileFunction · 0.80
SkipSpriteDataFunction · 0.80
ReadGRFSpriteOffsetsFunction · 0.80
LoadNextSpriteFunction · 0.80
BmpRead1Function · 0.80
BmpRead4Function · 0.80
BmpRead4RleFunction · 0.80
BmpRead8Function · 0.80
BmpRead8RleFunction · 0.80
BmpRead24Function · 0.80
BmpReadHeaderFunction · 0.80
LoadMethod · 0.80

Calls 1

SeekToMethod · 0.95

Tested by

no test coverage detected