diff options
author | theraven <theraven@FreeBSD.org> | 2012-03-14 00:09:36 +0000 |
---|---|---|
committer | theraven <theraven@FreeBSD.org> | 2012-03-14 00:09:36 +0000 |
commit | 7bd22d0949674b61e2c1a97cbb6caeeb5ab7fd19 (patch) | |
tree | 077f044b08d256dd8348f977fe56d18c08fccd78 /contrib/libc++/src/strstream.cpp | |
parent | d83b894ff4280333de5ef40496cfd061b515ba54 (diff) | |
parent | baa75b9984d33ea49ffb76a73507b64d879166cc (diff) | |
download | FreeBSD-src-7bd22d0949674b61e2c1a97cbb6caeeb5ab7fd19.zip FreeBSD-src-7bd22d0949674b61e2c1a97cbb6caeeb5ab7fd19.tar.gz |
Import new versions of libcxxrt and libc++.
Please tests any C++ code you care about with -stdlib=libc++!
Approved by: dim (mentor)
Diffstat (limited to 'contrib/libc++/src/strstream.cpp')
-rw-r--r-- | contrib/libc++/src/strstream.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/contrib/libc++/src/strstream.cpp b/contrib/libc++/src/strstream.cpp index 5313950..8cd19e6 100644 --- a/contrib/libc++/src/strstream.cpp +++ b/contrib/libc++/src/strstream.cpp @@ -34,7 +34,7 @@ void strstreambuf::__init(char* __gnext, streamsize __n, char* __pbeg) { if (__n == 0) - __n = strlen(__gnext); + __n = static_cast<streamsize>(strlen(__gnext)); else if (__n < 0) __n = INT_MAX; if (__pbeg == nullptr) @@ -160,12 +160,12 @@ strstreambuf::overflow(int_type __c) streamsize new_size = max<streamsize>(__alsize_, 2*old_size); char* buf = nullptr; if (__palloc_) - buf = static_cast<char*>(__palloc_(new_size)); + buf = static_cast<char*>(__palloc_(static_cast<size_t>(new_size))); else buf = new char[new_size]; if (buf == nullptr) return int_type(EOF); - memcpy(buf, eback(), old_size); + memcpy(buf, eback(), static_cast<size_t>(old_size)); ptrdiff_t ninp = gptr() - eback(); ptrdiff_t einp = egptr() - eback(); ptrdiff_t nout = pptr() - pbase(); @@ -179,7 +179,7 @@ strstreambuf::overflow(int_type __c) } setg(buf, buf + ninp, buf + einp); setp(buf + einp, buf + einp + eout); - pbump(nout); + pbump(static_cast<int>(nout)); __strmode_ |= __allocated; } *pptr() = static_cast<char>(__c); |