diff options
author | Bruce Mitchener <bruce.mitchener@gmail.com> | 2013-11-07 15:49:37 +0700 |
---|---|---|
committer | Bruce Mitchener <bruce.mitchener@gmail.com> | 2013-11-07 16:07:18 +0700 |
commit | 44af976a44bc194b985fdb880f99a7feff133b5a (patch) | |
tree | 400fb651d819c41e26b417d36a4315ec947fd387 /system/lib/libcxx/strstream.cpp | |
parent | 7f870cf9c357f6a1138ba612ace7d7249f85e250 (diff) |
Update libcxx to 194185, 2013-11-07.
This brings C++14 support.
Diffstat (limited to 'system/lib/libcxx/strstream.cpp')
-rw-r--r-- | system/lib/libcxx/strstream.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/system/lib/libcxx/strstream.cpp b/system/lib/libcxx/strstream.cpp index 518422bd..c1965ea3 100644 --- a/system/lib/libcxx/strstream.cpp +++ b/system/lib/libcxx/strstream.cpp @@ -156,13 +156,13 @@ strstreambuf::overflow(int_type __c) { if ((__strmode_ & __dynamic) == 0 || (__strmode_ & __frozen) != 0) return int_type(EOF); - streamsize old_size = (epptr() ? epptr() : egptr()) - eback(); - streamsize new_size = max<streamsize>(__alsize_, 2*old_size); + size_t old_size = static_cast<size_t> ((epptr() ? epptr() : egptr()) - eback()); + size_t new_size = max<size_t>(static_cast<size_t>(__alsize_), 2*old_size); if (new_size == 0) new_size = __default_alsize; char* buf = nullptr; if (__palloc_) - buf = static_cast<char*>(__palloc_(static_cast<size_t>(new_size))); + buf = static_cast<char*>(__palloc_(new_size)); else buf = new char[new_size]; if (buf == nullptr) @@ -229,8 +229,8 @@ strstreambuf::pos_type strstreambuf::seekoff(off_type __off, ios_base::seekdir __way, ios_base::openmode __which) { off_type __p(-1); - bool pos_in = __which & ios::in; - bool pos_out = __which & ios::out; + bool pos_in = (__which & ios::in) != 0; + bool pos_out = (__which & ios::out) != 0; bool legal = false; switch (__way) { @@ -287,8 +287,8 @@ strstreambuf::pos_type strstreambuf::seekpos(pos_type __sp, ios_base::openmode __which) { off_type __p(-1); - bool pos_in = __which & ios::in; - bool pos_out = __which & ios::out; + bool pos_in = (__which & ios::in) != 0; + bool pos_out = (__which & ios::out) != 0; if (pos_in || pos_out) { if (!((pos_in && gptr() == nullptr) || (pos_out && pptr() == nullptr))) |