From df4287c3c763de14b262ed39d54b3de552adbefb Mon Sep 17 00:00:00 2001 From: Jack Lloyd Date: Thu, 31 Aug 2017 07:13:58 -0400 Subject: Fix various MSVC warnings Based on VC2017 output --- src/lib/block/cast/cast128.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/lib/block/cast/cast128.cpp') 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& 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(m_X[i/4] >> (8*(3 - (i%4)))); + } + explicit ByteReader(const uint32_t* x) : m_X(x) {} private: const uint32_t* m_X; -- cgit v1.2.3