[DEV] add bad element in the init of the vector to prevent not init error

This commit is contained in:
Edouard DUPIN 2013-03-01 09:13:26 +01:00
parent fb13e03dc9
commit 951a94c0d9
2 changed files with 16 additions and 1 deletions

View File

@ -24,7 +24,15 @@ namespace etk
/***************************************************** /*****************************************************
* Constructor * Constructor
*****************************************************/ *****************************************************/
Vector2D(void) { }; // do nothing ==> better for optimisation Vector2D(void)
{
#ifdef DEBUG
// in debug mode we set supid value to prevent forget of the inits ...
m_floats[0] = (T)34673363;
m_floats[1] = (T)34523535;
#endif
};
Vector2D(T _x, T _y) Vector2D(T _x, T _y)
{ {
m_floats[0] = _x; m_floats[0] = _x;

View File

@ -30,6 +30,13 @@ namespace etk
*/ */
Vector3D(void) Vector3D(void)
{ {
#ifdef DEBUG
// in debug mode we set supid value to prevent forget of the inits ...
m_floats[0] = (T)34673363;
m_floats[1] = (T)34523535;
m_floats[2] = (T)43523424;
m_floats[3] = (T)23452345;
#endif
} }
/** /**
* @brief Constructor from scalars * @brief Constructor from scalars