diff options
author | Jeffrey Walton <noloader@gmail.com> | 2016-04-29 11:25:51 -0400 |
---|---|---|
committer | Jeffrey Walton <noloader@gmail.com> | 2016-04-29 11:25:51 -0400 |
commit | 8db0e7da6daa6e03287d8386cd19e82da7d7ddfb (patch) | |
tree | 2913e69f7fc3a71c98073cea7fd34c4fc5e1cb2e /zinflate.cpp | |
parent | 1ce593357f92a8789be2363fc5067f6245016931 (diff) | |
download | cryptopp-git-8db0e7da6daa6e03287d8386cd19e82da7d7ddfb.tar.gz |
Cleared compile errors under Visual Studio .Net compilers
Diffstat (limited to 'zinflate.cpp')
-rw-r--r-- | zinflate.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/zinflate.cpp b/zinflate.cpp index 9ce7fbe9..86bc2ed7 100644 --- a/zinflate.cpp +++ b/zinflate.cpp @@ -114,7 +114,7 @@ void HuffmanDecoder::Initialize(const unsigned int *codeBits, unsigned int nCode }
// MAX_CODE_BITS is 32, m_maxCodeBits may be smaller.
- const unsigned long long shiftedMaxCode = (1ULL << m_maxCodeBits);
+ const word64 shiftedMaxCode = ((word64)1 << m_maxCodeBits);
if (code > shiftedMaxCode - blCount[m_maxCodeBits])
throw Err("codes oversubscribed");
else if (m_maxCodeBits != 1 && code < shiftedMaxCode - blCount[m_maxCodeBits])
@@ -143,7 +143,7 @@ void HuffmanDecoder::Initialize(const unsigned int *codeBits, unsigned int nCode m_normalizedCacheMask = NormalizeCode(m_cacheMask, m_cacheBits);
assert(m_normalizedCacheMask == BitReverse(m_cacheMask));
- const unsigned long long shiftedCache = (1ULL << m_cacheBits);
+ const word64 shiftedCache = ((word64)1 << m_cacheBits);
assert(shiftedCache <= SIZE_MAX);
if (m_cache.size() != shiftedCache)
m_cache.resize((size_t)shiftedCache);
|