diff options
author | Jack Lloyd <[email protected]> | 2017-08-31 07:13:58 -0400 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2017-08-31 07:13:58 -0400 |
commit | df4287c3c763de14b262ed39d54b3de552adbefb (patch) | |
tree | 10b839bab8d2e36a806951bb2e5e5f0212f7a0f9 /src/lib/block/cast/cast128.cpp | |
parent | 17ef09021892afc4c0e9fe7ba97423bf832e6dc5 (diff) |
Fix various MSVC warnings
Based on VC2017 output
Diffstat (limited to 'src/lib/block/cast/cast128.cpp')
-rw-r--r-- | src/lib/block/cast/cast128.cpp | 6 |
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; |