Skip to content

Commit 14e60be

Browse files
committedJul 19, 2017
[libcxx] [test] Fix MSVC warning C4242 "conversion from 'int' to 'const char', possible loss of data".
Fixes D34534. llvm-svn: 308532
1 parent 36454af commit 14e60be

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed
 

‎libcxx/test/std/input.output/iostream.format/ext.manip/put_money.pass.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class testbuf
4040
if (__c != base::traits_type::eof())
4141
{
4242
int n = str_.size();
43-
str_.push_back(__c);
43+
str_.push_back(static_cast<CharT>(__c));
4444
str_.resize(str_.capacity());
4545
base::setp(const_cast<CharT*>(str_.data()),
4646
const_cast<CharT*>(str_.data() + str_.size()));

‎libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream_extractors/streambuf.pass.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ class testbuf
4646
if (__c != base::traits_type::eof())
4747
{
4848
int n = str_.size();
49-
str_.push_back(__c);
49+
str_.push_back(static_cast<CharT>(__c));
5050
str_.resize(str_.capacity());
5151
base::setp(const_cast<CharT*>(str_.data()),
5252
const_cast<CharT*>(str_.data() + str_.size()));

0 commit comments

Comments
 (0)
Please sign in to comment.