From 55b586e0e553f29c3685d7167ec2cefeb2f80552 Mon Sep 17 00:00:00 2001 From: Steve Checkoway Date: Fri, 19 Aug 2005 18:53:34 +0000 Subject: [PATCH] "Rotate left word _immediate_ then AND with Mask" The compiler must actually know the constant value. Declaring it const seems to work. --- stepmania/src/crypto51/misc.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stepmania/src/crypto51/misc.h b/stepmania/src/crypto51/misc.h index f212ba13fa..6739c88e31 100644 --- a/stepmania/src/crypto51/misc.h +++ b/stepmania/src/crypto51/misc.h @@ -287,13 +287,13 @@ template<> inline word32 rotrMod(word32 x, unsigned int y) # include #endif -template<> inline word32 rotlFixed(word32 x, unsigned int y) +template<> inline word32 rotlFixed(word32 x, const unsigned int y) { assert(y < 32); return y ? __rlwinm(x,y,0,31) : x; } -template<> inline word32 rotrFixed(word32 x, unsigned int y) +template<> inline word32 rotrFixed(word32 x, const unsigned int y) { assert(y < 32); return y ? __rlwinm(x,32-y,0,31) : x;