With gcc 10.1 I get a warning that the members of CVector2D might be uninitialized.
Fix this by always initializing.
Details
Details
- Reviewers
- None
- Commits
- rP23784: CVector2D: Fix members may not be initialized warnings
Agree
Should change no behaviour
Diff Detail
Diff Detail
- Repository
- rP 0 A.D. Public Repository
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
Event Timeline
Comment Actions
Hm, this technically could be a small performance regression if the uninitialisation is on purpose. Though I'm not sure it is from comparing with CVector3.
I'm not sure we use CVector2 a lot so it's probably irrelevant.
Comment Actions
Yeah, in theory. But I doubt it has a real impact. And as you also noticed we already do it in CVector3D
I'm not sure we use CVector2 a lot so it's probably irrelevant.
Yep.
So I'll commit this soon if nobody objects.