Changeset 94cb686 in mainline
- Timestamp:
- 2018-07-05T21:41:19Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- e7462e6
- Parents:
- 8cce80b4
- git-author:
- Dzejrou <dzejrou@…> (2017-12-04 15:51:29)
- git-committer:
- Dzejrou <dzejrou@…> (2018-07-05 21:41:19)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/cpp/include/impl/streambuf.hpp
r8cce80b4 r94cb686 108 108 int_type snextc() 109 109 { 110 if (traits_type::eq(sbumpc , traits_type::eof()))110 if (traits_type::eq(sbumpc(), traits_type::eof())) 111 111 return traits_type::eof(); 112 112 else … … 117 117 { 118 118 if (read_avail_()) 119 return traits_type::to_int_type(*input_next ++);119 return traits_type::to_int_type(*input_next_++); 120 120 else 121 121 return uflow(); … … 125 125 { 126 126 if (read_avail_()) 127 return traits_type::to_int_type(*input_next ++);127 return traits_type::to_int_type(*input_next_); 128 128 else 129 129 return underflow(); … … 144 144 return pbackfail(traits_type::to_int_type(c)); 145 145 else 146 return traits_type::to_int_type(*(--input_next ));146 return traits_type::to_int_type(*(--input_next_)); 147 147 } 148 148 … … 152 152 return pbackfail(); 153 153 else 154 return traits_type::to_int_type(*(--input_next ));154 return traits_type::to_int_type(*(--input_next_)); 155 155 } 156 156 … … 196 196 } 197 197 198 basic_str ambuf& operator=(const basic_streambuf& rhs)198 basic_streambuf& operator=(const basic_streambuf& rhs) 199 199 { 200 200 input_begin_ = rhs.input_begin_; … … 300 300 setbuf(char_type* s, streamsize n) 301 301 { 302 return *this;302 return this; 303 303 } 304 304 305 305 virtual pos_type seekoff(off_type off, ios_base::seekdir way, 306 ios_base::openmode which = ios_base::in | ops_base::out)306 ios_base::openmode which = ios_base::in | ios_base::out) 307 307 { 308 308 return pos_type(off_type(-1)); … … 341 341 break; 342 342 343 traits_type::asign(*s++, *input_next_++);343 *s++ = *input_next_++; 344 344 } 345 345 … … 379 379 return 0; 380 380 381 char* = &s[0];382 381 streamsize i{0}; 383 382 for (; i <= n; ++i) 384 383 { 385 if (!write_avail_() && traits_type::eq_int_type(overflow(), eof))384 if (!write_avail_() && traits_type::eq_int_type(overflow(), traits_type::eof())) 386 385 break; 387 386 388 traits_type::assign(*s++, *output_next_++);387 *output_next_++ = *s++; 389 388 } 390 389 … … 397 396 } 398 397 398 protected: 399 char_type* input_begin_; 400 char_type* input_next_; 401 char_type* input_end_; 402 403 char_type* output_begin_; 404 char_type* output_next_; 405 char_type* output_end_; 406 407 locale locale_; 408 399 409 private: 400 value_type* input_begin_;401 value_type* input_next_;402 value_type* input_end_;403 404 value_type* output_begin_;405 value_type* output_next_;406 value_type* output_end_;407 408 locale locale_;409 410 410 411 bool write_avail_() const
Note:
See TracChangeset
for help on using the changeset viewer.