Ticket #6827: restrict_impl.patch
File restrict_impl.patch, 941 bytes (added by , 10 years ago) |
---|
-
boost\iostreams\detail\restrict_impl.hpp
141 141 template<typename Source> 142 142 std::streamsize read(Source& src, char_type* s, std::streamsize n) 143 143 { 144 144 using namespace std; 145 145 if (!open_) 146 146 open(src, BOOST_IOS::in); 147 std::streamsize amt = 148 end_ != -1 ? 149 (std::min) (n, static_cast<std::streamsize>(end_ - pos_)) : 150 n; 147 148 std::streamsize amt(n); 149 if (end_ != -1 && end_ <= std::numeric_limits<std::streamsize>::max()) 150 amt = (std::min) (n, static_cast<std::streamsize>(end_ - pos_)); 151 151 152 std::streamsize result = 152 153 iostreams::read(this->component(), src, s, amt); 153 154 if (result != -1) 154 155 pos_ += result; 155 156 return result; 156 157 }