CVector2i: Add static assert for enforcing vector size

Provides compile-time guarantees about struct layout.
This commit is contained in:
Lioncash 2019-09-04 03:05:25 -04:00
parent c39186d3ba
commit 890c1e28e0
1 changed files with 2 additions and 0 deletions

View File

@ -28,4 +28,6 @@ public:
constexpr CVector2i operator*(int32_t val) const noexcept { return CVector2i(x * val, y * val); }
};
static_assert(sizeof(CVector2i) == sizeof(int32_t) * 2);
} // namespace zeus