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

Method FormatSingleValue

src/settings.cpp:333–339  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

331}
332
333std::string OneOfManySettingDesc::FormatSingleValue(uint id) const
334{
335 if (id >= this->many.size()) {
336 return fmt::format("{}", id);
337 }
338 return std::string{this->many[id]};
339}
340
341std::string OneOfManySettingDesc::FormatValue(const void *object) const
342{

Callers 1

FormatValueMethod · 0.95

Calls 2

formatFunction · 0.50
sizeMethod · 0.45

Tested by

no test coverage detected