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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user