aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/block/cast/cast128.cpp
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2017-08-31 12:08:03 -0400
committerJack Lloyd <[email protected]>2017-08-31 12:08:03 -0400
commit2d6e56947de655fd39bdb2e9ad34eb7822e39f5b (patch)
treed5fec51d83361db7fd5a2dbe056a29a9223d46c5 /src/lib/block/cast/cast128.cpp
parent2799c22fd10506a45df7b84a2352def6c31067ee (diff)
parent7fecb1254232311d5f2ca62f9cda1e12a4b2558c (diff)
Merge GH #1171 Fix various MSVC warnings
Diffstat (limited to 'src/lib/block/cast/cast128.cpp')
-rw-r--r--src/lib/block/cast/cast128.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/lib/block/cast/cast128.cpp b/src/lib/block/cast/cast128.cpp
index d955dfeef..26076e128 100644
--- a/src/lib/block/cast/cast128.cpp
+++ b/src/lib/block/cast/cast128.cpp
@@ -323,7 +323,11 @@ void CAST_128::cast_ks(secure_vector<uint32_t>& K,
class ByteReader
{
public:
- uint8_t operator()(size_t i) { return (m_X[i/4] >> (8*(3 - (i%4)))); }
+ uint8_t operator()(size_t i) const
+ {
+ return static_cast<uint8_t>(m_X[i/4] >> (8*(3 - (i%4))));
+ }
+
explicit ByteReader(const uint32_t* x) : m_X(x) {}
private:
const uint32_t* m_X;