summaryrefslogtreecommitdiff
path: root/zinflate.cpp
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2015-07-27 00:28:05 -0400
committerJeffrey Walton <noloader@gmail.com>2015-07-27 00:28:05 -0400
commitf017391174b69f5818786f9363e2c7631191c6c2 (patch)
treec203d37f3c491f5da96a10567638b317b04e3b71 /zinflate.cpp
parent23f59f6b288041882584c586e1327a2860c0894b (diff)
downloadcryptopp-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.cpp6
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();
}