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

Method Write

src/saveload/saveload.cpp:2410–2416  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2408 }
2409
2410 void Write(uint8_t *buf, size_t size) override
2411 {
2412 /* We're in the process of shutting down, i.e. in "failure" mode. */
2413 if (!this->file.has_value()) return;
2414
2415 if (fwrite(buf, 1, size, *this->file) != size) SlError(STR_GAME_SAVELOAD_ERROR_FILE_NOT_WRITEABLE);
2416 }
2417
2418 void Finish() override
2419 {

Callers 6

FlushMethod · 0.45
WriteMethod · 0.45
WriteMethod · 0.45
WriteLoopMethod · 0.45
WriteLoopMethod · 0.45
SaveFileToDiskFunction · 0.45

Calls 1

SlErrorFunction · 0.85

Tested by

no test coverage detected