Skip to content

Commit

Permalink
fix windows warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
sbiscigl committed Aug 29, 2024
1 parent c190743 commit 73bb395
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions include/aws/crt/io/Stream.h
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ namespace Aws
*
* @return return value of the underlying istream::peek
*/
virtual uint8_t PeekImpl() const noexcept = 0;
virtual int64_t PeekImpl() const noexcept = 0;

private:
static int s_Seek(aws_input_stream *stream, int64_t offset, enum aws_stream_seek_basis basis);
Expand Down Expand Up @@ -187,7 +187,7 @@ namespace Aws
StreamStatus GetStatusImpl() const noexcept override;
int64_t GetLengthImpl() const noexcept override;
bool SeekImpl(OffsetType offsetType, StreamSeekBasis seekBasis) noexcept override;
uint8_t PeekImpl() const noexcept override;
int64_t PeekImpl() const noexcept override;

private:
std::shared_ptr<Aws::Crt::Io::IStream> m_stream;
Expand Down
5 changes: 2 additions & 3 deletions source/io/Stream.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,7 @@ namespace Aws
// I have no idea why "readsome() doesn't work at all" for the original dev. It works well for me
// Jokes aside, read will always block and try to read till eof
// readsome will return available bytes without waiting for eof and without closing the stream.
auto actuallyRead = 0;
actuallyRead = m_stream->readsome(
auto actuallyRead = m_stream->readsome(
reinterpret_cast<char *>(buffer.buffer + buffer.len), buffer.capacity - buffer.len);

buffer.len += static_cast<size_t>(actuallyRead);
Expand Down Expand Up @@ -229,7 +228,7 @@ namespace Aws
return true;
}

uint8_t StdIOStreamInputStream::PeekImpl() const noexcept
int64_t StdIOStreamInputStream::PeekImpl() const noexcept
{
return m_stream->peek();
}
Expand Down

0 comments on commit 73bb395

Please sign in to comment.