From 7f2a92d759786e1bf1b8ad5eb43f14a45722596a Mon Sep 17 00:00:00 2001 From: Tony Hagale Date: Wed, 19 Mar 2014 16:28:12 -0500 Subject: [PATCH] #2386 trying a new static lookup table for numberOfOnes() --- libraries/shared/src/SharedUtil.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/shared/src/SharedUtil.cpp b/libraries/shared/src/SharedUtil.cpp index 00810653c1..882d4719c8 100644 --- a/libraries/shared/src/SharedUtil.cpp +++ b/libraries/shared/src/SharedUtil.cpp @@ -131,7 +131,7 @@ void outputBits(unsigned char byte, QDebug* continuedDebug) { int numberOfOnes(unsigned char byte) { - static const unsigned char nbits[256] = { + static const int nbits[256] = { 0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,1,2,2,3,2,3,3,4,2,3,3, 4,3,4,4,5,1,2,2,3,2,3,3,4,2,3,3,4,3,4,4,5,2,3,3,4,3,4, 4,5,3,4,4,5,4,5,5,6,1,2,2,3,2,3,3,4,2,3,3,4,3,4,4,5,2,