Codechange: Pass avail(able) as reference instead of pointer since they are never nullptr (#12696)

This commit is contained in:
Loïc Guilloux
2024-05-18 17:04:16 +02:00
committed by GitHub
parent ba47d1ca2b
commit 29ce013eda
33 changed files with 75 additions and 75 deletions

View File

@@ -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;
}