~zooko/cryptopp/trunk

« back to all changes in this revision

Viewing changes to zdeflate.cpp

  • Committer: noloader
  • Date: 2015-06-29 13:37:03 UTC
  • Revision ID: svn-v4:57ff6487-cd31-0410-9ec3-f628ee90f5f0:trunk/c5:558
Cleared warning on operator precedence

Show diffs side-by-side

added added

removed removed

Lines of Context:
9
9
#include "zdeflate.h"
10
10
#include <functional>
11
11
 
 
12
#if _MSC_VER >= 1600
 
13
// for make_unchecked_array_iterator
 
14
#include <iterator>
 
15
#endif
 
16
 
12
17
NAMESPACE_BEGIN(CryptoPP)
13
18
 
14
19
using namespace std;
214
219
 
215
220
Deflator::Deflator(BufferedTransformation *attachment, int deflateLevel, int log2WindowSize, bool detectUncompressible)
216
221
        : LowFirstBitWriter(attachment)
 
222
        , m_deflateLevel(-1)
217
223
{
218
224
        InitializeStaticEncoders();
219
225
        IsolatedInitialize(MakeParameters("DeflateLevel", deflateLevel)("Log2WindowSize", log2WindowSize)("DetectUncompressible", detectUncompressible));
221
227
 
222
228
Deflator::Deflator(const NameValuePairs &parameters, BufferedTransformation *attachment)
223
229
        : LowFirstBitWriter(attachment)
 
230
        , m_deflateLevel(-1)
224
231
{
225
232
        InitializeStaticEncoders();
226
233
        IsolatedInitialize(parameters);
384
391
                {
385
392
                        assert(scan[2] == match[2]);
386
393
                        unsigned int len = (unsigned int)(
387
 
#ifdef _STDEXT_BEGIN
 
394
#if defined(_STDEXT_BEGIN) && !(defined(_MSC_VER) && (_MSC_VER < 1400 || _MSC_VER >= 1600)) && !defined(_STLPORT_VERSION)
388
395
                                stdext::unchecked_mismatch
389
396
#else
390
397
                                std::mismatch
391
398
#endif
 
399
#if _MSC_VER >= 1600
 
400
                                (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));
 
401
#else
392
402
                                (scan+3, scanEnd, match+3).first - scan);
 
403
#endif
393
404
                        assert(len != bestLength);
394
405
                        if (len > bestLength)
395
406
                        {
636
647
        {
637
648
                if (blockType == DYNAMIC)
638
649
                {
639
 
#if defined(_MSC_VER) && !defined(__MWERKS__) && (_MSC_VER < 1300)
640
 
                        // VC60 workaround: built-in reverse_iterator has two template parameters, Dinkumware only has one
 
650
#if defined(_MSC_VER) && !defined(__MWERKS__) && (_MSC_VER <= 1300)
 
651
                        // VC60 and VC7 workaround: built-in reverse_iterator has two template parameters, Dinkumware only has one
641
652
                        typedef reverse_bidirectional_iterator<unsigned int *, unsigned int> RevIt;
 
653
#elif defined(_RWSTD_NO_CLASS_PARTIAL_SPEC)
 
654
        typedef reverse_iterator<unsigned int *, random_access_iterator_tag, unsigned int> RevIt;
642
655
#else
643
656
                        typedef reverse_iterator<unsigned int *> RevIt;
644
657
#endif