Page MenuHomeWildfire Games

CVector2D: Fix members may not be initialized warnings
ClosedPublic

Authored by Imarok on Jun 20 2020, 9:42 AM.

Details

Summary

With gcc 10.1 I get a warning that the members of CVector2D might be uninitialized.
Fix this by always initializing.

Test Plan

Agree
Should change no behaviour

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

Imarok created this revision.Jun 20 2020, 9:42 AM

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.

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.

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.

This revision was not accepted when it landed; it landed in state Needs Review.Jun 21 2020, 8:23 PM
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.