diff options
author | Jeffrey Walton <noloader@gmail.com> | 2015-07-27 00:28:05 -0400 |
---|---|---|
committer | Jeffrey Walton <noloader@gmail.com> | 2015-07-27 00:28:05 -0400 |
commit | f017391174b69f5818786f9363e2c7631191c6c2 (patch) | |
tree | c203d37f3c491f5da96a10567638b317b04e3b71 /zinflate.cpp | |
parent | 23f59f6b288041882584c586e1327a2860c0894b (diff) | |
download | cryptopp-git-f017391174b69f5818786f9363e2c7631191c6c2.tar.gz |
Cleared "auto_ptr is deprecated" warning. Switch to unique_ptr when C++11 is in effect
Diffstat (limited to 'zinflate.cpp')
-rw-r--r-- | zinflate.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/zinflate.cpp b/zinflate.cpp index ffc4b9df..4b6e3bea 100644 --- a/zinflate.cpp +++ b/zinflate.cpp @@ -602,8 +602,12 @@ struct NewFixedDistanceDecoder HuffmanDecoder * operator()() const { unsigned int codeLengths[32]; - std::fill(codeLengths + 0, codeLengths + 32, 5); + std::fill(codeLengths + 0, codeLengths + 32, 5U); +#if defined(CRYPTOPP_CXX11) + std::unique_ptr<HuffmanDecoder> pDecoder(new HuffmanDecoder); +#else std::auto_ptr<HuffmanDecoder> pDecoder(new HuffmanDecoder); +#endif pDecoder->Initialize(codeLengths, 32); return pDecoder.release(); } |