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

Method MakeValueValidAndWrite

src/settings.cpp:487–491  ·  view source on GitHub ↗

* Make the value valid and then write it to the setting. * See #MakeValidValid and #Write for more details. * @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

485 * @param val Signed version of the new value.
486 */
487void IntSettingDesc::MakeValueValidAndWrite(const void *object, int32_t val) const
488{
489 this->MakeValueValid(val);
490 this->Write(object, val);
491}
492
493/**
494 * Make the value valid given the limitations of this setting.

Callers 4

ParseValueMethod · 0.95
HandleOldDiffCustomFunction · 0.80
LoadSettingsFunction · 0.80

Calls 2

MakeValueValidMethod · 0.95
WriteMethod · 0.95

Tested by

no test coverage detected