MCPcopy Create free account
hub / github.com/OpenLoco/OpenLoco / setPosition

Method setPosition

src/Core/src/FileStream.cpp:149–158  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

147 }
148
149 void FileStream::setPosition(size_t position)
150 {
151 if (_mode == StreamMode::none)
152 {
153 throw Exception::InvalidOperation("Invalid mode");
154 }
155 position = std::min(_length, static_cast<size_t>(position));
156 fileSeek(_file, position, SEEK_SET);
157 _offset = position;
158 }
159
160 void FileStream::read(void* buffer, size_t len)
161 {

Callers 5

compareGameStatesFunction · 0.45
validateChecksumMethod · 0.45
loadSoundsFromCSSFunction · 0.45
TESTFunction · 0.45
TESTFunction · 0.45

Calls 1

fileSeekFunction · 0.85

Tested by 2

TESTFunction · 0.36
TESTFunction · 0.36