Tidy up some integer conversion warnings

This commit is contained in:
Vinnie Falco committed 2017-07-20 08:15:27 -07:00
1 parent 9be141a1e0
commit 30e6426db5
4 files changed
+5 -3

No files matched your search

+2 -1
View File
@@ -204,7 +204,8 @@ get(beast::error_code& ec) ->
{
// Calculate the smaller of our buffer size,
// or the amount of unread data in the file.
auto const amount = std::min<std::uint64_t>(remain_, sizeof(buf_));
auto const amount = remain_ > sizeof(buf_) ?
sizeof(buf_) : static_cast<std::size_t>(remain_);
// Check for an empty file
if(amount == 0)