Mercurial > minori
changeset 188:168382a89b21
time: static assert time_t
author | Paper <mrpapersonic@gmail.com> |
---|---|
date | Wed, 06 Dec 2023 13:44:36 -0500 |
parents | 9613d72b097e |
children | 649786bae914 |
files | src/core/time.cc |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
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); }