16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-21 02:29:19 +02:00

reformat: use auto on certain types

This commit is contained in:
jerrrrycho
2026-07-04 04:04:17 +02:00
parent a4c126b4ea
commit f61068ff89
53 changed files with 200 additions and 201 deletions

View File

@@ -62,7 +62,7 @@ bool node_groups::assign_cross_switch(map::track_switch& sw, std::string &sw_nam
if (!sw.action[idx])
return false;
multi_event *multi = dynamic_cast<multi_event*>(sw.action[idx]);
auto multi = dynamic_cast<multi_event*>(sw.action[idx]);
if (!multi)
return false;
@@ -135,7 +135,7 @@ node_groups::update_map()
}
if (Global.map_manualswitchcontrol) {
if (TTrack *track = dynamic_cast<TTrack*>(node)) {
if (auto track = dynamic_cast<TTrack*>(node)) {
if (track->eType != tt_Switch)
continue;
@@ -203,7 +203,7 @@ node_groups::update_map()
last_switch_map.erase(sw_name);
}
} else {
if (TEventLauncher *launcher = dynamic_cast<TEventLauncher*>(node)) {
if (auto launcher = dynamic_cast<TEventLauncher*>(node)) {
if (!launcher || !launcher->Event1 || !launcher->Event2)
continue;