From c643ceb6b4a0747f6c2d545bb9acf5301be79a4e Mon Sep 17 00:00:00 2001 From: drepper Date: Mon, 23 Nov 1998 09:21:12 +0000 Subject: (operator>>): Cast new character to char before adding to string. (getline): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@23786 138bc75d-0d04-0410-961f-82ee72b054a4 --- libstdc++/std/bastring.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'libstdc++') diff --git a/libstdc++/std/bastring.cc b/libstdc++/std/bastring.cc index b5f7a0dbfef..4ecef59e3df 100644 --- a/libstdc++/std/bastring.cc +++ b/libstdc++/std/bastring.cc @@ -39,7 +39,7 @@ operator delete (void * ptr) { Allocator::deallocate(ptr, sizeof(Rep) + reinterpret_cast(ptr)->res * - sizeof (charT)); + sizeof (charT)); } template @@ -450,7 +450,7 @@ operator>> (istream &is, basic_string &s) sb->sungetc (); break; } - s += ch; + s += static_cast (ch); if (--w == 1) break; } @@ -496,7 +496,7 @@ getline (istream &is, basic_string & s, charT delim) if (ch == delim) break; - s += ch; + s += static_cast (ch); if (s.length () == s.npos - 1) { -- cgit v1.2.3