aboutsummaryrefslogtreecommitdiffstats
path: root/include/fstream
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2017-06-16 21:04:04 +0000
committerDimitry Andric <dim@FreeBSD.org>2017-06-16 21:04:04 +0000
commit8462a49537476f8c62bcabfe490226af0d7c1cae (patch)
treeadbbe01182274045b7a8a9085c8f160360b9bea9 /include/fstream
parent74c4bc8d0eddcb4786594f1c6b598094fac43859 (diff)
downloadsrc-8462a49537476f8c62bcabfe490226af0d7c1cae.tar.gz
src-8462a49537476f8c62bcabfe490226af0d7c1cae.zip
Vendor import of libc++ trunk r305575:vendor/libc++/libc++-trunk-r305575
Notes
Notes: svn path=/vendor/libc++/dist/; revision=320019 svn path=/vendor/libc++/libc++-trunk-r305575/; revision=320020; tag=vendor/libc++/libc++-trunk-r305575
Diffstat (limited to 'include/fstream')
-rw-r--r--include/fstream7
1 files changed, 4 insertions, 3 deletions
diff --git a/include/fstream b/include/fstream
index e41a53af4a0c..ffd569839bd4 100644
--- a/include/fstream
+++ b/include/fstream
@@ -617,7 +617,7 @@ basic_filebuf<_CharT, _Traits>::underflow()
static_cast<size_t>(__extbufend_ - __extbufnext_));
codecvt_base::result __r;
__st_last_ = __st_;
- size_t __nr = fread((void*)__extbufnext_, 1, __nmemb, __file_);
+ size_t __nr = fread((void*) const_cast<char *>(__extbufnext_), 1, __nmemb, __file_);
if (__nr != 0)
{
if (!__cv_)
@@ -630,7 +630,8 @@ basic_filebuf<_CharT, _Traits>::underflow()
this->eback() + __ibs_, __inext);
if (__r == codecvt_base::noconv)
{
- this->setg((char_type*)__extbuf_, (char_type*)__extbuf_, (char_type*)__extbufend_);
+ this->setg((char_type*)__extbuf_, (char_type*)__extbuf_,
+ (char_type*)const_cast<char *>(__extbufend_));
__c = traits_type::to_int_type(*this->gptr());
}
else if (__inext != this->eback() + __unget_sz)
@@ -722,7 +723,7 @@ basic_filebuf<_CharT, _Traits>::overflow(int_type __c)
return traits_type::eof();
if (__r == codecvt_base::partial)
{
- this->setp((char_type*)__e, this->pptr());
+ this->setp(const_cast<char_type*>(__e), this->pptr());
this->pbump(this->epptr() - this->pbase());
}
}