diff --git a/coding/reader_streambuf.cpp b/coding/reader_streambuf.cpp index 2379ce2c35..88f24e19f9 100644 --- a/coding/reader_streambuf.cpp +++ b/coding/reader_streambuf.cpp @@ -17,7 +17,7 @@ ReaderStreamBuf::~ReaderStreamBuf() std::streamsize ReaderStreamBuf::xsgetn(char_type * s, std::streamsize n) { - uint64_t const count = min(static_cast(n), m_size - m_pos); + std::streamsize const count = min(n, static_cast(m_size - m_pos)); if (count > 0) { m_p->Read(m_pos, s, count); diff --git a/coding/reader_streambuf.hpp b/coding/reader_streambuf.hpp index 8136be0ba0..bb26acec06 100644 --- a/coding/reader_streambuf.hpp +++ b/coding/reader_streambuf.hpp @@ -37,7 +37,7 @@ class WriterStreamBuf : public BaseStreamBuf Writer * m_writer; public: - /// Takes the ownership of p. Reader should be allocated in dynamic memory. + /// Takes the ownership of p. Writer should be allocated in dynamic memory. WriterStreamBuf(Writer * p) : m_writer(p) {} virtual ~WriterStreamBuf();