[cfe-commits] [libcxx] r124727 - /libcxx/trunk/include/fstream

Howard Hinnant hhinnant at apple.com
Wed Feb 2 09:37:16 PST 2011


Author: hhinnant
Date: Wed Feb  2 11:37:16 2011
New Revision: 124727

URL: http://llvm.org/viewvc/llvm-project?rev=124727&view=rev
Log:
Missing traits::to_int_type in fstream

Modified:
    libcxx/trunk/include/fstream

Modified: libcxx/trunk/include/fstream
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/fstream?rev=124727&r1=124726&r2=124727&view=diff
==============================================================================
--- libcxx/trunk/include/fstream (original)
+++ libcxx/trunk/include/fstream Wed Feb  2 11:37:16 2011
@@ -579,7 +579,7 @@
                 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 @@
                 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;





More information about the cfe-commits mailing list