Fix narrowing in static_ostream

This commit is contained in:
Vinnie Falco
2017-06-22 09:40:11 -07:00
parent b5c69ff7c7
commit ef493d4489
2 changed files with 3 additions and 1 deletions

View File

@ -2,6 +2,7 @@ Version 65:
* Enable narrowing warning on msvc cmake * Enable narrowing warning on msvc cmake
* Fix integer types in deflate_stream::bi_reverse * Fix integer types in deflate_stream::bi_reverse
* Fix narrowing in static_ostream
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------

View File

@ -57,7 +57,8 @@ public:
{ {
if(! Traits::eq_int_type(ch, Traits::eof())) if(! Traits::eq_int_type(ch, Traits::eof()))
{ {
Traits::assign(*this->pptr(), ch); Traits::assign(*this->pptr(),
static_cast<CharT>(ch));
flush(1); flush(1);
prepare(); prepare();
return ch; return ch;