mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-17 23:39:18 +02:00
Do not use temp variable when it is not needed
This commit is contained in:
@@ -537,13 +537,12 @@ updatevalues_event::run_() {
|
||||
// targetcell->LogValues();
|
||||
if( targetcell->Track == nullptr ) { continue; }
|
||||
// McZapkie-100302 - updatevalues oprocz zmiany wartosci robi putcommand dla wszystkich 'dynamic' na danym torze
|
||||
auto const location { targetcell->location() };
|
||||
for( auto vehicle : targetcell->Track->Dynamics ) {
|
||||
if( vehicle->Mechanik ) {
|
||||
WriteLog( " Vehicle: [" + vehicle->name() + "]" );
|
||||
targetcell->PutCommand(
|
||||
vehicle->Mechanik,
|
||||
&location );
|
||||
&targetcell->location() );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user