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

Method GetNewsReference

src/subsidy.cpp:43–50  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

41 * @returns NewsReference.
42 */
43NewsReference Source::GetNewsReference() const
44{
45 switch (this->type) {
46 case SourceType::Industry: return static_cast<IndustryID>(this->id);
47 case SourceType::Town: return static_cast<TownID>(this->id);
48 default: NOT_REACHED();
49 }
50}
51
52/**
53 * Get the format string for a subsidy Source.

Callers 3

AwardToMethod · 0.80
CreateSubsidyFunction · 0.80
subsidy.cppFile · 0.80

Calls 1

NOT_REACHEDFunction · 0.85

Tested by

no test coverage detected