diff options
author | lloyd <[email protected]> | 2007-07-23 15:44:04 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2007-07-23 15:44:04 +0000 |
commit | e2f1f734277146d817ab284dea21e4013cb5b937 (patch) | |
tree | 21ad6ee775e36aa7fb24a504077200c22b1f15b8 /include/bit_ops.h | |
parent | 211c4929ae92106794984d872a0cae1a873baa29 (diff) |
Avoid C-style casts (as detected by GCC's -Wold-style-cast) and instead use
static_cast or reinterpret_cast, as needed.
Diffstat (limited to 'include/bit_ops.h')
-rw-r--r-- | include/bit_ops.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/include/bit_ops.h b/include/bit_ops.h index 4b8d248d6..5883d2163 100644 --- a/include/bit_ops.h +++ b/include/bit_ops.h @@ -15,10 +15,14 @@ namespace Botan { * Word Rotation Functions * *************************************************/ template<typename T> inline T rotate_left(T input, u32bit rot) - { return (T)((input << rot) | (input >> (8*sizeof(T)-rot))); } + { + return static_cast<T>((input << rot) | (input >> (8*sizeof(T)-rot)));; + } template<typename T> inline T rotate_right(T input, u32bit rot) - { return (T)((input >> rot) | (input << (8*sizeof(T)-rot))); } + { + return static_cast<T>((input >> rot) | (input << (8*sizeof(T)-rot))); + } /************************************************* * XOR Functions * |