From 220f1e5fc9a5817906fc2b7441b903b21ab3f9f4 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Sat, 25 Jul 2015 17:24:57 -0700 Subject: 1850 - fix a warning on 32-bit systems --- 001help.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/001help.cc b/001help.cc index 3e2a5944..24df0f29 100644 --- a/001help.cc +++ b/001help.cc @@ -78,7 +78,7 @@ bool is_equal(char* s, const char* lit) { // yadda-yadda. Instead use this macro below to perform an unsafe cast to // signed. We'll just give up immediately if a container's every too large. :(before "End Includes") -#define SIZE(X) (assert(X.size() < (1LL<<62)), static_cast(X.size())) +#define SIZE(X) (assert(X.size() < (1LL<<(sizeof(long long int)*8-2))), static_cast(X.size())) // // 5. Integer overflow is still impossible to guard against. Maybe after // reading http://www.cs.utah.edu/~regehr/papers/overflow12.pdf -- cgit 1.4.1-2-gfad0