mirror of https://github.com/AxioDL/zeus.git
CVector2i: Add static assert for enforcing vector size
Provides compile-time guarantees about struct layout.
This commit is contained in:
parent
c39186d3ba
commit
890c1e28e0
|
@ -28,4 +28,6 @@ public:
|
||||||
|
|
||||||
constexpr CVector2i operator*(int32_t val) const noexcept { return CVector2i(x * val, y * val); }
|
constexpr CVector2i operator*(int32_t val) const noexcept { return CVector2i(x * val, y * val); }
|
||||||
};
|
};
|
||||||
|
static_assert(sizeof(CVector2i) == sizeof(int32_t) * 2);
|
||||||
|
|
||||||
} // namespace zeus
|
} // namespace zeus
|
||||||
|
|
Loading…
Reference in New Issue