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

Method Write

src/settings.cpp:556–560  ·  view source on GitHub ↗

* Set the value of a setting. * @param object The object the setting is to be saved in. * @param val Signed version of the new value. */

Source from the content-addressed store, hash-verified

554 * @param val Signed version of the new value.
555 */
556void IntSettingDesc::Write(const void *object, int32_t val) const
557{
558 void *ptr = GetVariableAddress(object, this->save);
559 WriteValue(ptr, this->save.conv, (int64_t)val);
560}
561
562/**
563 * Read the integer from the the actual setting.

Callers 4

ResetToDefaultMethod · 0.95
ChangeValueMethod · 0.95
ParseValueMethod · 0.45

Calls 3

GetVariableAddressFunction · 0.85
WriteValueFunction · 0.85
assignMethod · 0.45

Tested by

no test coverage detected