diff options
author | 2018-09-11 18:18:58 +0000 | |
---|---|---|
committer | 2018-09-11 18:18:58 +0000 | |
commit | 820e1f31efc1d6ed04795ba2e79f3044e1907492 (patch) | |
tree | 815cebb3734784074b661935c33f00bd5eb4d862 /lib/libcxx/src/strstream.cpp | |
parent | Nuke unused LIST() ieee80211com_head. (diff) | |
download | wireguard-openbsd-820e1f31efc1d6ed04795ba2e79f3044e1907492.tar.xz wireguard-openbsd-820e1f31efc1d6ed04795ba2e79f3044e1907492.zip |
import of libc++ 6.0.0
Diffstat (limited to 'lib/libcxx/src/strstream.cpp')
-rw-r--r-- | lib/libcxx/src/strstream.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/libcxx/src/strstream.cpp b/lib/libcxx/src/strstream.cpp index 0e2d7ff21bb..8b8521f76af 100644 --- a/lib/libcxx/src/strstream.cpp +++ b/lib/libcxx/src/strstream.cpp @@ -11,7 +11,9 @@ #include "algorithm" #include "climits" #include "cstring" +#include "cstdlib" #include "__debug" +#include "__undef_macros" _LIBCPP_BEGIN_NAMESPACE_STD @@ -184,7 +186,7 @@ strstreambuf::overflow(int_type __c) } setg(buf, buf + ninp, buf + einp); setp(buf + einp, buf + new_size); - pbump(static_cast<int>(nout)); + __pbump(nout); __strmode_ |= __allocated; } *pptr() = static_cast<char>(__c); @@ -266,6 +268,8 @@ strstreambuf::seekoff(off_type __off, ios_base::seekdir __way, ios_base::openmod case ios::end: newoff = seekhigh - eback(); break; + default: + _LIBCPP_UNREACHABLE(); } newoff += __off; if (0 <= newoff && newoff <= seekhigh - eback()) @@ -278,7 +282,7 @@ strstreambuf::seekoff(off_type __off, ios_base::seekdir __way, ios_base::openmod // min(pbase, newpos), newpos, epptr() __off = epptr() - newpos; setp(min(pbase(), newpos), epptr()); - pbump(static_cast<int>((epptr() - pbase()) - __off)); + __pbump((epptr() - pbase()) - __off); } __p = newoff; } @@ -308,7 +312,7 @@ strstreambuf::seekpos(pos_type __sp, ios_base::openmode __which) // min(pbase, newpos), newpos, epptr() off_type temp = epptr() - newpos; setp(min(pbase(), newpos), epptr()); - pbump(static_cast<int>((epptr() - pbase()) - temp)); + __pbump((epptr() - pbase()) - temp); } __p = newoff; } |