Ticket #11508: boost_1_59_0.iostreams.wshadow.patch
File boost_1_59_0.iostreams.wshadow.patch, 9.4 KB (added by , 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 179 179 : basic_buffer<Ch, Alloc>(buffer_size) { } 180 180 181 181 template<typename Ch, typename Alloc> 182 inline void buffer<Ch, Alloc>::set(std::streamsize ptr , std::streamsize end)182 inline void buffer<Ch, Alloc>::set(std::streamsize ptr_arg, std::streamsize end) 183 183 { 184 ptr_ = data() + ptr ;184 ptr_ = data() + ptr_arg; 185 185 eptr_ = data() + end; 186 186 } 187 187 -
boost/iostreams/filter/gzip.hpp
diff -ru boost.orig/boost/iostreams/filter/gzip.hpp boost/boost/iostreams/filter/gzip.hpp
old new 135 135 struct gzip_params : zlib_params { 136 136 137 137 // 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_) 148 148 { } 149 149 std::string file_name; 150 150 std::string comment; … … 160 160 // 161 161 class gzip_error : public BOOST_IOSTREAMS_FAILURE { 162 162 public: 163 explicit gzip_error(int error )163 explicit gzip_error(int error_arg) 164 164 : BOOST_IOSTREAMS_FAILURE("gzip error"), 165 error_(error ), zlib_error_code_(zlib::okay) { }165 error_(error_arg), zlib_error_code_(zlib::okay) { } 166 166 explicit gzip_error(const zlib_error& e) 167 167 : BOOST_IOSTREAMS_FAILURE("gzip error"), 168 168 error_(gzip::zlib_error), zlib_error_code_(e.error()) … … 505 505 if (footer_.done()) { 506 506 if (footer_.crc() != this->crc()) 507 507 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)) { 510 510 state_ = s_done; 511 511 } else { 512 512 peek.putback(c); … … 567 567 struct peekable_source { 568 568 typedef char char_type; 569 569 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) 572 572 { } 573 573 std::streamsize read(char* s, std::streamsize n) 574 574 { -
boost/iostreams/filter/symmetric.hpp
diff -ru boost.orig/boost/iostreams/filter/symmetric.hpp boost/boost/iostreams/filter/symmetric.hpp
old new 102 102 if (!(state() & f_read)) 103 103 begin_read(); 104 104 105 buffer_type& buf = pimpl_->buf_;105 buffer_type& buf_l = pimpl_->buf_; 106 106 int status = (state() & f_eof) != 0 ? f_eof : f_good; 107 107 char_type *next_s = s, 108 108 *end_s = s + n; … … 110 110 { 111 111 // Invoke filter if there are unconsumed characters in buffer or if 112 112 // 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(); 116 116 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()); 119 119 if (done) 120 120 return detail::check_eof( 121 121 static_cast<std::streamsize>(next_s - s) … … 124 124 125 125 // If no more characters are available without blocking, or 126 126 // 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()) || 128 128 next_s == end_s ) 129 129 { 130 130 return static_cast<std::streamsize>(next_s - s); … … 142 142 if (!(state() & f_write)) 143 143 begin_write(); 144 144 145 buffer_type& buf = pimpl_->buf_;145 buffer_type& buf_l = pimpl_->buf_; 146 146 const char_type *next_s, *end_s; 147 147 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)) 149 149 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)) { 151 151 flush(snk); 152 152 break; 153 153 } … … 165 165 166 166 // Repeatedly invoke filter() with no input. 167 167 try { 168 buffer_type& buf = pimpl_->buf_;168 buffer_type& buf_l = pimpl_->buf_; 169 169 char_type dummy; 170 170 const char_type* end = &dummy; 171 171 bool again = true; 172 172 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 ); 176 176 flush(snk); 177 177 } 178 178 } catch (...) { -
boost/iostreams/filter/zlib.hpp
diff -ru boost.orig/boost/iostreams/filter/zlib.hpp boost/boost/iostreams/filter/zlib.hpp
old new 110 110 struct zlib_params { 111 111 112 112 // 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_) 123 123 { } 124 124 int level; 125 125 int method; -
libs/iostreams/src/zlib.cpp
diff -ru boost.orig/libs/iostreams/src/zlib.cpp boost/libs/iostreams/src/zlib.cpp
old new 67 67 68 68 //------------------Implementation of zlib_error------------------------------// 69 69 70 zlib_error::zlib_error(int error )71 : BOOST_IOSTREAMS_FAILURE("zlib error"), error_(error )70 zlib_error::zlib_error(int error_arg) 71 : BOOST_IOSTREAMS_FAILURE("zlib error"), error_(error_arg) 72 72 { } 73 73 74 74 void zlib_error::check BOOST_PREVENT_MACRO_SUBSTITUTION(int error)