Panagiotis Christopoulos Charitos 13 лет назад
Родитель
Сommit
5d7d1ebc23
5 измененных файлов с 11 добавлено и 1 удалено
  1. 2 0
      include/anki/math/Mat3.h
  2. 2 0
      include/anki/math/Mat4.h
  3. 3 1
      include/anki/math/Vec2.h
  4. 2 0
      include/anki/math/Vec3.h
  5. 2 0
      include/anki/math/Vec4.h

+ 2 - 0
include/anki/math/Mat3.h

@@ -127,6 +127,8 @@ private:
 };
 };
 /// @}
 /// @}
 
 
+static_assert(sizeof(Mat3) == sizeof(float) * 3 * 3, "Incorrect size");
+
 } // end namespace
 } // end namespace
 
 
 #include "anki/math/Mat3.inl.h"
 #include "anki/math/Mat3.inl.h"

+ 2 - 0
include/anki/math/Mat4.h

@@ -134,6 +134,8 @@ private:
 };
 };
 /// @}
 /// @}
 
 
+static_assert(sizeof(Mat4) == sizeof(float) * 4 * 4, "Incorrect size");
+
 } // end namespace
 } // end namespace
 
 
 #include "anki/math/Mat4.inl.h"
 #include "anki/math/Mat4.inl.h"

+ 3 - 1
include/anki/math/Vec2.h

@@ -95,7 +95,9 @@ private:
 	};
 	};
 	/// @}
 	/// @}
 };
 };
-/// @}
+/// @
+
+static_assert(sizeof(Vec2) == sizeof(float) * 2, "Incorrect size");
 
 
 } // end namespace
 } // end namespace
 
 

+ 2 - 0
include/anki/math/Vec3.h

@@ -135,6 +135,8 @@ private:
 };
 };
 /// @}
 /// @}
 
 
+static_assert(sizeof(Vec3) == sizeof(float) * 3, "Incorrect size");
+
 } // end namespace
 } // end namespace
 
 
 #include "anki/math/Vec3.inl.h"
 #include "anki/math/Vec3.inl.h"

+ 2 - 0
include/anki/math/Vec4.h

@@ -120,6 +120,8 @@ private:
 };
 };
 /// @}
 /// @}
 
 
+static_assert(sizeof(Vec4) == sizeof(float) * 4, "Incorrect size");
+
 } // end namespace
 } // end namespace
 
 
 #include "anki/math/Vec4.inl.h"
 #include "anki/math/Vec4.inl.h"