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

Method Read

src/settings.cpp:567–571  ·  view source on GitHub ↗

* Read the integer from the the actual setting. * @param object The object the setting is to be saved in. * @return The value of the saved integer. */

Source from the content-addressed store, hash-verified

565 * @return The value of the saved integer.
566 */
567int32_t IntSettingDesc::Read(const void *object) const
568{
569 void *ptr = GetVariableAddress(object, this->save);
570 return (int32_t)ReadValue(ptr, this->save.conv);
571}
572
573/**
574 * Make the value valid given the limitations of this setting.

Callers 15

FormatValueMethod · 0.95
IsSameValueMethod · 0.95
IsDefaultValueMethod · 0.95
ChangeValueMethod · 0.95
DrawSettingMethod · 0.45
SyncCompanySettingsFunction · 0.45
IConsoleGetSettingFunction · 0.45
ReplaceParamMethod · 0.45
ParseStringChoiceFunction · 0.45
DecodeEncodedStringFunction · 0.45
FormatStringFunction · 0.45

Calls 2

GetVariableAddressFunction · 0.85
ReadValueFunction · 0.85

Tested by

no test coverage detected