aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/modes/mode_pad/mode_pad.cpp
diff options
context:
space:
mode:
authorDan Brown <[email protected]>2016-04-27 15:21:26 -0700
committerDan Brown <[email protected]>2016-04-27 15:21:26 -0700
commita0a2b66b3b6ba9dd94f924ef9639570f4a4ae2b6 (patch)
treec4fdfd8e588a2550a0d2b6f5c41d1cdffffcacc6 /src/lib/modes/mode_pad/mode_pad.cpp
parentb55e9bca0c747154aeeb188df9a8a6eda6d65124 (diff)
Add explicit static_cast operations to eliminate implicit cast compiler warnings.
Diffstat (limited to 'src/lib/modes/mode_pad/mode_pad.cpp')
-rw-r--r--src/lib/modes/mode_pad/mode_pad.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/modes/mode_pad/mode_pad.cpp b/src/lib/modes/mode_pad/mode_pad.cpp
index ecf241821..0f1df9e8a 100644
--- a/src/lib/modes/mode_pad/mode_pad.cpp
+++ b/src/lib/modes/mode_pad/mode_pad.cpp
@@ -37,7 +37,7 @@ void PKCS7_Padding::add_padding(secure_vector<byte>& buffer,
size_t last_byte_pos,
size_t block_size) const
{
- const byte pad_value = block_size - last_byte_pos;
+ const byte pad_value = static_cast<byte>(block_size - last_byte_pos);
for(size_t i = 0; i != pad_value; ++i)
buffer.push_back(pad_value);
@@ -67,7 +67,7 @@ void ANSI_X923_Padding::add_padding(secure_vector<byte>& buffer,
size_t last_byte_pos,
size_t block_size) const
{
- const byte pad_value = block_size - last_byte_pos;
+ const byte pad_value = static_cast<byte>(block_size - last_byte_pos);
for(size_t i = last_byte_pos; i < block_size; ++i)
buffer.push_back(0);