| Index: src/IceUtils.h
|
| diff --git a/src/IceUtils.h b/src/IceUtils.h
|
| index bcbba23eeab4bc441d63e616fd5cd7ee54bc528b..cf0be63364f2eb1052073c9c501fec60d538881e 100644
|
| --- a/src/IceUtils.h
|
| +++ b/src/IceUtils.h
|
| @@ -78,6 +78,19 @@ public:
|
| return 0;
|
| return Align - Mod;
|
| }
|
| +
|
| + // Precondition: 0 <= shift < 32
|
| + static inline uint32_t rotateLeft32(uint32_t value, uint32_t shift) {
|
| + if (shift == 0)
|
| + return value;
|
| + return (value << shift) | (value >> (32 - shift));
|
| + }
|
| +
|
| + static inline uint32_t rotateRight32(uint32_t value, uint32_t shift) {
|
| + if (shift == 0)
|
| + return value;
|
| + return (value >> shift) | (value << (32 - shift));
|
| + }
|
| };
|
|
|
| } // end of namespace Ice
|
|
|