From 47a7cce01e02f66274c16c425e7a9560f98d1706 Mon Sep 17 00:00:00 2001 From: Howard Hinnant Date: Wed, 2 Feb 2011 17:37:16 +0000 Subject: [PATCH] Missing traits::to_int_type in fstream git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@124727 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/fstream | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/fstream b/include/fstream index 5734aa07..809a4971 100644 --- a/include/fstream +++ b/include/fstream @@ -579,7 +579,7 @@ basic_filebuf<_CharT, _Traits>::underflow() this->setg(this->eback(), this->eback() + __unget_sz, this->eback() + __unget_sz + __nmemb); - __c = *this->gptr(); + __c = traits_type::to_int_type(*this->gptr()); } } else @@ -602,18 +602,18 @@ basic_filebuf<_CharT, _Traits>::underflow() if (__r == codecvt_base::noconv) { this->setg((char_type*)__extbuf_, (char_type*)__extbuf_, (char_type*)__extbufend_); - __c = *this->gptr(); + __c = traits_type::to_int_type(*this->gptr()); } else if (__inext != this->eback() + __unget_sz) { this->setg(this->eback(), this->eback() + __unget_sz, __inext); - __c = *this->gptr(); + __c = traits_type::to_int_type(*this->gptr()); } } } } else - __c = *this->gptr(); + __c = traits_type::to_int_type(*this->gptr()); if (this->eback() == &__1buf) this->setg(0, 0, 0); return __c;