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

Method GetName

src/newgrf_config.cpp:85–89  ·  view source on GitHub ↗

* Get the name of this grf. In case the name isn't known * the filename is returned. * @return The name of filename of this grf. */

Source from the content-addressed store, hash-verified

83 * @return The name of filename of this grf.
84 */
85std::string GRFConfig::GetName() const
86{
87 auto name = GetGRFStringFromGRFText(this->name);
88 return name.has_value() && !name->empty() ? std::string(*name) : this->filename;
89}
90
91/**
92 * Get the grf info.

Callers 2

AddFileMethod · 0.45
GRFSorterFunction · 0.45

Calls 3

GetGRFStringFromGRFTextFunction · 0.85
stringFunction · 0.85
emptyMethod · 0.45

Tested by

no test coverage detected