diff options
author | weidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0> | 2011-10-12 06:13:37 +0000 |
---|---|---|
committer | weidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0> | 2011-10-12 06:13:37 +0000 |
commit | 69de3b14426c96725bbf19d4c828b193f0f175b2 (patch) | |
tree | c863e7c992fa355e45d1fe7258f56664bfdda4d5 /misc.h | |
parent | d8257ec3e567f0f7509cd6dba11faea9c67c9cb5 (diff) | |
download | cryptopp-69de3b14426c96725bbf19d4c828b193f0f175b2.tar.gz |
fix compile with clang 2.9 (Jeff Walton)
git-svn-id: svn://svn.code.sf.net/p/cryptopp/code/trunk/c5@532 57ff6487-cd31-0410-9ec3-f628ee90f5f0
Diffstat (limited to 'misc.h')
-rw-r--r-- | misc.h | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -580,13 +580,13 @@ CRYPTOPP_DLL void CRYPTOPP_API UnalignedDeallocate(void *p); template <class T> inline T rotlFixed(T x, unsigned int y) { assert(y < sizeof(T)*8); - return T((x<<y) | (x>>(sizeof(T)*8-y))); + return y ? T((x<<y) | (x>>(sizeof(T)*8-y))) : x; } template <class T> inline T rotrFixed(T x, unsigned int y) { assert(y < sizeof(T)*8); - return T((x>>y) | (x<<(sizeof(T)*8-y))); + return y ? T((x>>y) | (x<<(sizeof(T)*8-y))) : x; } template <class T> inline T rotlVariable(T x, unsigned int y) |