diff options
author | weidai <weidai11@users.noreply.github.com> | 2010-06-29 02:46:17 +0000 |
---|---|---|
committer | weidai <weidai11@users.noreply.github.com> | 2010-06-29 02:46:17 +0000 |
commit | d1c31d0a04f55e59475012df42990d52604b936a (patch) | |
tree | d9a35e39c3f1405ae31a2a09189e2ad68e604817 /zdeflate.cpp | |
parent | 1ce62ff79b8365e334de7c7056a134af0e493784 (diff) | |
download | cryptopp-git-d1c31d0a04f55e59475012df42990d52604b936a.tar.gz |
rename "cryptdll" project to "cryptopp"
fix compile errors on MSVC 2010
Diffstat (limited to 'zdeflate.cpp')
-rw-r--r-- | zdeflate.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/zdeflate.cpp b/zdeflate.cpp index bef0f7c1..bdcd7ba4 100644 --- a/zdeflate.cpp +++ b/zdeflate.cpp @@ -9,6 +9,11 @@ #include "zdeflate.h" #include <functional> +#if _MSC_VER >= 1600 +// for make_unchecked_array_iterator +#include <iterator> +#endif + NAMESPACE_BEGIN(CryptoPP) using namespace std; @@ -386,12 +391,16 @@ unsigned int Deflator::LongestMatch(unsigned int &bestMatch) const { assert(scan[2] == match[2]); unsigned int len = (unsigned int)( -#if defined(_STDEXT_BEGIN) && !(defined(_MSC_VER) && _MSC_VER < 1400) && !defined(_STLPORT_VERSION) +#if defined(_STDEXT_BEGIN) && !(defined(_MSC_VER) && (_MSC_VER < 1400 || _MSC_VER >= 1600)) && !defined(_STLPORT_VERSION) stdext::unchecked_mismatch #else std::mismatch #endif +#if _MSC_VER >= 1600 + (stdext::make_unchecked_array_iterator(scan)+3, stdext::make_unchecked_array_iterator(scanEnd), stdext::make_unchecked_array_iterator(match)+3).first - stdext::make_unchecked_array_iterator(scan)); +#else (scan+3, scanEnd, match+3).first - scan); +#endif assert(len != bestLength); if (len > bestLength) { |