Ticket #11508: boost_1_59_0.iostreams.wshadow.patch

File boost_1_59_0.iostreams.wshadow.patch, 9.4 KB (added by davido, 7 years ago)
  • boost/iostreams/detail/buffer.hpp

    diff -ru boost.orig/boost/iostreams/detail/buffer.hpp boost/boost/iostreams/detail/buffer.hpp
    old new  
    179179    : basic_buffer<Ch, Alloc>(buffer_size) { }
    180180
    181181template<typename Ch, typename Alloc>
    182 inline void buffer<Ch, Alloc>::set(std::streamsize ptr, std::streamsize end)
     182inline void buffer<Ch, Alloc>::set(std::streamsize ptr_arg, std::streamsize end)
    183183{
    184     ptr_ = data() + ptr;
     184    ptr_ = data() + ptr_arg;
    185185    eptr_ = data() + end;
    186186}
    187187
  • boost/iostreams/filter/gzip.hpp

    diff -ru boost.orig/boost/iostreams/filter/gzip.hpp boost/boost/iostreams/filter/gzip.hpp
    old new  
    135135struct gzip_params : zlib_params {
    136136
    137137    // Non-explicit constructor.
    138     gzip_params( int level              = gzip::default_compression,
    139                  int method             = gzip::deflated,
    140                  int window_bits        = gzip::default_window_bits,
    141                  int mem_level          = gzip::default_mem_level,
    142                  int strategy           = gzip::default_strategy,
    143                  std::string file_name  = "",
    144                  std::string comment    = "",
    145                  std::time_t mtime      = 0 )
    146         : zlib_params(level, method, window_bits, mem_level, strategy),
    147           file_name(file_name), comment(comment), mtime(mtime)
     138    gzip_params( int level_              = gzip::default_compression,
     139                 int method_             = gzip::deflated,
     140                 int window_bits_        = gzip::default_window_bits,
     141                 int mem_level_          = gzip::default_mem_level,
     142                 int strategy_           = gzip::default_strategy,
     143                 std::string file_name_  = "",
     144                 std::string comment_    = "",
     145                 std::time_t mtime_      = 0 )
     146        : zlib_params(level_, method_, window_bits_, mem_level_, strategy_),
     147          file_name(file_name_), comment(comment_), mtime(mtime_)
    148148        { }
    149149    std::string  file_name;
    150150    std::string  comment;
     
    160160//
    161161class gzip_error : public BOOST_IOSTREAMS_FAILURE {
    162162public:
    163     explicit gzip_error(int error)
     163    explicit gzip_error(int error_arg)
    164164        : BOOST_IOSTREAMS_FAILURE("gzip error"),
    165           error_(error), zlib_error_code_(zlib::okay) { }
     165          error_(error_arg), zlib_error_code_(zlib::okay) { }
    166166    explicit gzip_error(const zlib_error& e)
    167167        : BOOST_IOSTREAMS_FAILURE("gzip error"),
    168168          error_(gzip::zlib_error), zlib_error_code_(e.error())
     
    505505                if (footer_.done()) {
    506506                    if (footer_.crc() != this->crc())
    507507                        boost::throw_exception(gzip_error(gzip::bad_crc));
    508                     int c = boost::iostreams::get(peek);
    509                     if (traits_type::is_eof(c)) {
     508                    int c2 = boost::iostreams::get(peek);
     509                    if (traits_type::is_eof(c2)) {
    510510                        state_ = s_done;
    511511                    } else {
    512512                        peek.putback(c);
     
    567567    struct peekable_source {
    568568        typedef char char_type;
    569569        struct category : source_tag, peekable_tag { };
    570         explicit peekable_source(Source& src, const string_type& putback = "")
    571             : src_(src), putback_(putback), offset_(0)
     570        explicit peekable_source(Source& src, const string_type& putback_arg = "")
     571            : src_(src), putback_(putback_arg), offset_(0)
    572572            { }
    573573        std::streamsize read(char* s, std::streamsize n)
    574574        {
  • boost/iostreams/filter/symmetric.hpp

    diff -ru boost.orig/boost/iostreams/filter/symmetric.hpp boost/boost/iostreams/filter/symmetric.hpp
    old new  
    102102        if (!(state() & f_read))
    103103            begin_read();
    104104
    105         buffer_type&  buf = pimpl_->buf_;
     105        buffer_type&  buf_l = pimpl_->buf_;
    106106        int           status = (state() & f_eof) != 0 ? f_eof : f_good;
    107107        char_type    *next_s = s,
    108108                     *end_s = s + n;
     
    110110        {
    111111            // Invoke filter if there are unconsumed characters in buffer or if
    112112            // filter must be flushed.
    113             bool flush = status == f_eof;
    114             if (buf.ptr() != buf.eptr() || flush) {
    115                 const char_type* next = buf.ptr();
     113            bool flush_l = status == f_eof;
     114            if (buf_l.ptr() != buf_l.eptr() || flush_l) {
     115                const char_type* next = buf_l.ptr();
    116116                bool done =
    117                     !filter().filter(next, buf.eptr(), next_s, end_s, flush);
    118                 buf.ptr() = buf.data() + (next - buf.data());
     117                    !filter().filter(next, buf_l.eptr(), next_s, end_s, flush_l);
     118                buf_l.ptr() = buf_l.data() + (next - buf_l.data());
    119119                if (done)
    120120                    return detail::check_eof(
    121121                               static_cast<std::streamsize>(next_s - s)
     
    124124
    125125            // If no more characters are available without blocking, or
    126126            // if read request has been satisfied, return.
    127             if ( (status == f_would_block && buf.ptr() == buf.eptr()) ||
     127            if ( (status == f_would_block && buf_l.ptr() == buf_l.eptr()) ||
    128128                 next_s == end_s )
    129129            {
    130130                return static_cast<std::streamsize>(next_s - s);
     
    142142        if (!(state() & f_write))
    143143            begin_write();
    144144
    145         buffer_type&     buf = pimpl_->buf_;
     145        buffer_type&     buf_l = pimpl_->buf_;
    146146        const char_type *next_s, *end_s;
    147147        for (next_s = s, end_s = s + n; next_s != end_s; ) {
    148             if (buf.ptr() == buf.eptr() && !flush(snk))
     148            if (buf_l.ptr() == buf_l.eptr() && !flush(snk))
    149149                break;
    150             if(!filter().filter(next_s, end_s, buf.ptr(), buf.eptr(), false)) {
     150            if(!filter().filter(next_s, end_s, buf_l.ptr(), buf_l.eptr(), false)) {
    151151                flush(snk);
    152152                break;
    153153            }
     
    165165
    166166            // Repeatedly invoke filter() with no input.
    167167            try {
    168                 buffer_type&     buf = pimpl_->buf_;
     168                buffer_type&     buf_l = pimpl_->buf_;
    169169                char_type        dummy;
    170170                const char_type* end = &dummy;
    171171                bool             again = true;
    172172                while (again) {
    173                     if (buf.ptr() != buf.eptr())
    174                         again = filter().filter( end, end, buf.ptr(),
    175                                                  buf.eptr(), true );
     173                    if (buf_l.ptr() != buf_l.eptr())
     174                        again = filter().filter( end, end, buf_l.ptr(),
     175                                                 buf_l.eptr(), true );
    176176                    flush(snk);
    177177                }
    178178            } catch (...) {
  • boost/iostreams/filter/zlib.hpp

    diff -ru boost.orig/boost/iostreams/filter/zlib.hpp boost/boost/iostreams/filter/zlib.hpp
    old new  
    110110struct zlib_params {
    111111
    112112    // Non-explicit constructor.
    113     zlib_params( int level           = zlib::default_compression,
    114                  int method          = zlib::deflated,
    115                  int window_bits     = zlib::default_window_bits,
    116                  int mem_level       = zlib::default_mem_level,
    117                  int strategy        = zlib::default_strategy,
    118                  bool noheader       = zlib::default_noheader,
    119                  bool calculate_crc  = zlib::default_crc )
    120         : level(level), method(method), window_bits(window_bits),
    121           mem_level(mem_level), strategy(strategy), 
    122           noheader(noheader), calculate_crc(calculate_crc)
     113    zlib_params( int level_           = zlib::default_compression,
     114                 int method_          = zlib::deflated,
     115                 int window_bits_     = zlib::default_window_bits,
     116                 int mem_level_       = zlib::default_mem_level,
     117                 int strategy_        = zlib::default_strategy,
     118                 bool noheader_       = zlib::default_noheader,
     119                 bool calculate_crc_  = zlib::default_crc )
     120        : level(level_), method(method_), window_bits(window_bits_),
     121          mem_level(mem_level_), strategy(strategy_), 
     122          noheader(noheader_), calculate_crc(calculate_crc_)
    123123        { }
    124124    int level;
    125125    int method;
  • libs/iostreams/src/zlib.cpp

    diff -ru boost.orig/libs/iostreams/src/zlib.cpp boost/libs/iostreams/src/zlib.cpp
    old new  
    6767
    6868//------------------Implementation of zlib_error------------------------------//
    6969                   
    70 zlib_error::zlib_error(int error)
    71     : BOOST_IOSTREAMS_FAILURE("zlib error"), error_(error)
     70zlib_error::zlib_error(int error_arg)
     71    : BOOST_IOSTREAMS_FAILURE("zlib error"), error_(error_arg)
    7272    { }
    7373
    7474void zlib_error::check BOOST_PREVENT_MACRO_SUBSTITUTION(int error)