Codechange: Don't use bit-field in Yapf rail node. (#11362)

Compacting 3 booleans into 3 bits could save memory allocation, however this data is inside a union which also contains a 4-byte integer. As such this gives the cost penalty of a bit-field without any benefit.
This commit is contained in:
Peter Nelson
2023-10-09 13:11:55 +01:00
committed by GitHub
parent 84201a8520
commit ac9db3f5aa

View File

@@ -127,9 +127,9 @@ struct CYapfRailNodeT
union {
uint32_t m_inherited_flags;
struct {
bool m_targed_seen : 1;
bool m_choice_seen : 1;
bool m_last_signal_was_red : 1;
bool m_targed_seen;
bool m_choice_seen;
bool m_last_signal_was_red;
} flags_s;
} flags_u;
SignalType m_last_red_signal_type;