tangrams / tangram-es

2D and 3D map renderer using OpenGL ES
MIT License
823 stars 239 forks source link

m_velocityPan initial value. #2345

Open hoss291069 opened 9 months ago

hoss291069 commented 9 months ago

Hi In util/inputHandler.h file member object m_velocityPan does not initialize. In Linux OS usually uninitialized variables take zero value but in windows it's value is unknown. if this variable has a big number at startup, it cause fast moving to unknown position. That's why I think it's better initialize in header to zero. glm::vec2 m_velocityPan={0,0};

matteblair commented 9 months ago

Hi, thanks for checking out the code!

I believe this variable is already being initialized to zero by its default constructor. The glm::vec types have optional default constructors that we enable with the GLM_FORCE_CTOR_INIT define in our build script.

Have you observed this variable being initialized with a non-zero value?