summaryrefslogtreecommitdiff
path: root/cryptlib.cpp
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2019-09-28 21:08:22 -0400
committerJeffrey Walton <noloader@gmail.com>2019-09-28 21:08:22 -0400
commit9807a3268fea880f22b59cb7936511276ed2e867 (patch)
tree4e09532c9b8ac583a0a520366ff5cc092b7c5e29 /cryptlib.cpp
parent1190da17eaae1874610a27cb2303cb91d6da20dc (diff)
downloadcryptopp-git-9807a3268fea880f22b59cb7936511276ed2e867.tar.gz
Clear sign conversion warnings
Diffstat (limited to 'cryptlib.cpp')
-rw-r--r--cryptlib.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/cryptlib.cpp b/cryptlib.cpp
index e248935a..929ed618 100644
--- a/cryptlib.cpp
+++ b/cryptlib.cpp
@@ -770,9 +770,9 @@ size_t BufferedTransformation::PeekWord16(word16 &value, ByteOrder order) const
size_t len = Peek(buf, 2);
if (order == BIG_ENDIAN_ORDER)
- value = ((word16)buf[0] << 8) | (word16)buf[1];
+ value = word16((buf[0] << 8) | buf[1]);
else
- value = ((word16)buf[1] << 8) | (word16)buf[0];
+ value = word16((buf[1] << 8) | buf[0]);
return len;
}
@@ -783,11 +783,11 @@ size_t BufferedTransformation::PeekWord32(word32 &value, ByteOrder order) const
size_t len = Peek(buf, 4);
if (order == BIG_ENDIAN_ORDER)
- value = ((word32)buf[0] << 24) | ((word32)buf[1] << 16) |
- ((word32)buf[2] << 8) | (word32)buf[3];
+ value = word32((buf[0] << 24) | (buf[1] << 16) |
+ (buf[2] << 8) | (buf[3] << 0));
else
- value = ((word32)buf[3] << 24) | ((word32)buf[2] << 16) |
- ((word32)buf[1] << 8) | (word32)buf[0];
+ value = word32((buf[3] << 24) | (buf[2] << 16) |
+ (buf[1] << 8) | (buf[0] << 0));
return len;
}