Codechange: Pass avail(able) as reference instead of pointer since they are never nullptr (#12696)
This commit is contained in:
@@ -64,7 +64,7 @@ uint32_t RoadStopScopeResolver::GetTriggers() const
|
||||
return this->st == nullptr ? 0 : this->st->waiting_triggers;
|
||||
}
|
||||
|
||||
uint32_t RoadStopScopeResolver::GetVariable(uint8_t variable, [[maybe_unused]] uint32_t parameter, bool *available) const
|
||||
uint32_t RoadStopScopeResolver::GetVariable(uint8_t variable, [[maybe_unused]] uint32_t parameter, bool &available) const
|
||||
{
|
||||
auto get_road_type_variable = [&](RoadTramType rtt) -> uint32_t {
|
||||
RoadType rt;
|
||||
@@ -196,7 +196,7 @@ uint32_t RoadStopScopeResolver::GetVariable(uint8_t variable, [[maybe_unused]] u
|
||||
|
||||
if (this->st != nullptr) return this->st->GetNewGRFVariable(this->ro, variable, parameter, available);
|
||||
|
||||
*available = false;
|
||||
available = false;
|
||||
return UINT_MAX;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user