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

Method ReadByte

src/saveload/saveload.cpp:120–132  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

118 }
119
120 inline uint8_t ReadByte()
121 {
122 if (this->bufp == this->bufe) {
123 size_t len = this->reader->Read(this->buf, lengthof(this->buf));
124 if (len == 0) SlErrorCorrupt("Unexpected end of chunk");
125
126 this->read += len;
127 this->bufp = this->buf;
128 this->bufe = this->buf + len;
129 }
130
131 return *this->bufp++;
132 }
133
134 /**
135 * Get the size of the memory dump made so far.

Callers 5

DecodeSingleSpriteFunction · 0.45
LoadSpriteV1Function · 0.45
LoadSpriteV2Function · 0.45
GetGRFContainerVersionFunction · 0.45
SlReadByteFunction · 0.45

Calls 2

SlErrorCorruptFunction · 0.85
ReadMethod · 0.45

Tested by

no test coverage detected