diff options
author | Paolo Carlini <pcarlini@suse.de> | 2005-07-20 22:07:57 +0000 |
---|---|---|
committer | Paolo Carlini <paolo@gcc.gnu.org> | 2005-07-20 22:07:57 +0000 |
commit | cdcdee12daace5c1072620b1db280a6a51156c96 (patch) | |
tree | 45bdedf211ca29ab9b267fe198cce41c1f494d79 | |
parent | 71b50543a7624e54ac80d439d31b6667ce01500b (diff) | |
download | gcc-cdcdee12daace5c1072620b1db280a6a51156c96.zip gcc-cdcdee12daace5c1072620b1db280a6a51156c96.tar.gz gcc-cdcdee12daace5c1072620b1db280a6a51156c96.tar.bz2 |
streambuf.tcc (xsgetn, xsputn): Use streamsize instead of size_t.
2005-07-20 Paolo Carlini <pcarlini@suse.de>
* include/bits/streambuf.tcc (xsgetn, xsputn): Use streamsize
instead of size_t.
* src/streambuf.cc (__copy_streambufs): Likewise.
From-SVN: r102204
-rw-r--r-- | libstdc++-v3/ChangeLog | 6 | ||||
-rw-r--r-- | libstdc++-v3/include/bits/streambuf.tcc | 14 | ||||
-rw-r--r-- | libstdc++-v3/src/streambuf.cc | 10 |
3 files changed, 18 insertions, 12 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 4f7b8db..810bc4c 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,9 @@ +2005-07-20 Paolo Carlini <pcarlini@suse.de> + + * include/bits/streambuf.tcc (xsgetn, xsputn): Use streamsize + instead of size_t. + * src/streambuf.cc (__copy_streambufs): Likewise. + 2005-07-18 Paolo Carlini <pcarlini@suse.de> * config/locale/gnu/ctype_members.cc (do_is(mask, wchar_t)): diff --git a/libstdc++-v3/include/bits/streambuf.tcc b/libstdc++-v3/include/bits/streambuf.tcc index bbce9e5..f7b9cff 100644 --- a/libstdc++-v3/include/bits/streambuf.tcc +++ b/libstdc++-v3/include/bits/streambuf.tcc @@ -1,6 +1,6 @@ // Stream buffer classes -*- C++ -*- -// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 +// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -52,11 +52,11 @@ namespace std streamsize __ret = 0; while (__ret < __n) { - const size_t __buf_len = this->egptr() - this->gptr(); + const streamsize __buf_len = this->egptr() - this->gptr(); if (__buf_len) { - const size_t __remaining = __n - __ret; - const size_t __len = std::min(__buf_len, __remaining); + const streamsize __remaining = __n - __ret; + const streamsize __len = std::min(__buf_len, __remaining); traits_type::copy(__s, this->gptr(), __len); __ret += __len; __s += __len; @@ -86,11 +86,11 @@ namespace std streamsize __ret = 0; while (__ret < __n) { - const size_t __buf_len = this->epptr() - this->pptr(); + const streamsize __buf_len = this->epptr() - this->pptr(); if (__buf_len) { - const size_t __remaining = __n - __ret; - const size_t __len = std::min(__buf_len, __remaining); + const streamsize __remaining = __n - __ret; + const streamsize __len = std::min(__buf_len, __remaining); traits_type::copy(this->pptr(), __s, __len); __ret += __len; __s += __len; diff --git a/libstdc++-v3/src/streambuf.cc b/libstdc++-v3/src/streambuf.cc index 2f96409..7badf94 100644 --- a/libstdc++-v3/src/streambuf.cc +++ b/libstdc++-v3/src/streambuf.cc @@ -1,6 +1,6 @@ // Stream buffer classes -*- C++ -*- -// Copyright (C) 2004 Free Software Foundation, Inc. +// Copyright (C) 2004, 2005 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -45,10 +45,10 @@ namespace std traits_type::int_type __c = __sbin->sgetc(); while (!traits_type::eq_int_type(__c, traits_type::eof())) { - const size_t __n = __sbin->egptr() - __sbin->gptr(); + const streamsize __n = __sbin->egptr() - __sbin->gptr(); if (__n > 1) { - const size_t __wrote = __sbout->sputn(__sbin->gptr(), __n); + const streamsize __wrote = __sbout->sputn(__sbin->gptr(), __n); __sbin->gbump(__wrote); __ret += __wrote; if (__wrote < __n) @@ -78,10 +78,10 @@ namespace std traits_type::int_type __c = __sbin->sgetc(); while (!traits_type::eq_int_type(__c, traits_type::eof())) { - const size_t __n = __sbin->egptr() - __sbin->gptr(); + const streamsize __n = __sbin->egptr() - __sbin->gptr(); if (__n > 1) { - const size_t __wrote = __sbout->sputn(__sbin->gptr(), __n); + const streamsize __wrote = __sbout->sputn(__sbin->gptr(), __n); __sbin->gbump(__wrote); __ret += __wrote; if (__wrote < __n) |