Mercurial > minori
diff src/core/time.cc @ 188:168382a89b21
time: static assert time_t
author | Paper <mrpapersonic@gmail.com> |
---|---|
date | Wed, 06 Dec 2023 13:44:36 -0500 |
parents | 9b2b41f83a5e |
children | 7cf53145de11 |
line wrap: on
line diff
--- a/src/core/time.cc Wed Dec 06 13:43:54 2023 -0500 +++ b/src/core/time.cc Wed Dec 06 13:44:36 2023 -0500 @@ -56,7 +56,7 @@ } int64_t GetSystemTime() { - assert(sizeof(int64_t) >= sizeof(time_t)); + static_assert(sizeof(int64_t) >= sizeof(time_t)); time_t t = std::time(nullptr); return *reinterpret_cast<int64_t*>(&t); }