From e597a8d72eba1241b944fee48c0be4d6203acc4c Mon Sep 17 00:00:00 2001 From: gingerBill Date: Sun, 13 May 2018 17:38:35 +0100 Subject: Fix issues with exact integer bounds and remove dead code --- src/common.cpp | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) (limited to 'src/common.cpp') diff --git a/src/common.cpp b/src/common.cpp index 354750a24..95f212ee1 100644 --- a/src/common.cpp +++ b/src/common.cpp @@ -241,6 +241,39 @@ String i64_to_string(i64 a, char *out_buf, isize out_buf_len) { } +gb_global i64 const signed_integer_mins[] = { + 0, + -128ll, + -32768ll, + 0, + -2147483648ll, + 0, + 0, + 0, + -9223372036854775808ll, +}; +gb_global i64 const signed_integer_maxs[] = { + 0, + 127ll, + 32767ll, + 0, + 2147483647ll, + 0, + 0, + 0, + 9223372036854775807ll, +}; +gb_global u64 const unsigned_integer_maxs[] = { + 0, + 255ull, + 65535ull, + 0, + 4294967295ull, + 0, + 0, + 0, + 18446744073709551615ull, +}; -- cgit v1.2.3