summaryrefslogtreecommitdiffstats
path: root/libcxx/src/strstream.cpp
diff options
context:
space:
mode:
authorMarshall Clow <mclow.lists@gmail.com>2013-08-14 17:53:31 +0000
committerMarshall Clow <mclow.lists@gmail.com>2013-08-14 17:53:31 +0000
commita8c7c154bb820e21a141602297514b5849607148 (patch)
tree3934719f0725df78cf7a4a21cb889387188b7a0f /libcxx/src/strstream.cpp
parente5b3eb70e539212f17a7f6fe8f4f470c1841245b (diff)
downloadbcm5719-llvm-a8c7c154bb820e21a141602297514b5849607148.tar.gz
bcm5719-llvm-a8c7c154bb820e21a141602297514b5849607148.zip
Fix signed/unsigned warnings when building libc++ in C++14 mode
llvm-svn: 188395
Diffstat (limited to 'libcxx/src/strstream.cpp')
-rw-r--r--libcxx/src/strstream.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/libcxx/src/strstream.cpp b/libcxx/src/strstream.cpp
index 518422bd242..08a78a74f6c 100644
--- a/libcxx/src/strstream.cpp
+++ b/libcxx/src/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)
OpenPOWER on IntegriCloud