mirror of
https://github.com/boostorg/beast.git
synced 2025-08-01 22:04:34 +02:00
Tidy up some integer conversion warnings
This commit is contained in:
@@ -3,6 +3,7 @@ Version 61:
|
|||||||
* Remove Spirit dependency
|
* Remove Spirit dependency
|
||||||
* Use generic_cateogry for errno
|
* Use generic_cateogry for errno
|
||||||
* Reorganize SSL examples
|
* Reorganize SSL examples
|
||||||
|
* Tidy up some integer conversion warnings
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
@@ -204,7 +204,8 @@ get(beast::error_code& ec) ->
|
|||||||
{
|
{
|
||||||
// Calculate the smaller of our buffer size,
|
// Calculate the smaller of our buffer size,
|
||||||
// or the amount of unread data in the file.
|
// 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
|
// Check for an empty file
|
||||||
if(amount == 0)
|
if(amount == 0)
|
||||||
|
@@ -51,7 +51,7 @@ public:
|
|||||||
inline
|
inline
|
||||||
size_type
|
size_type
|
||||||
throughput(std::chrono::duration<
|
throughput(std::chrono::duration<
|
||||||
double> const& elapsed, std::size_t items)
|
double> const& elapsed, size_type items)
|
||||||
{
|
{
|
||||||
using namespace std::chrono;
|
using namespace std::chrono;
|
||||||
return static_cast<size_type>(
|
return static_cast<size_type>(
|
||||||
|
@@ -209,7 +209,7 @@ private:
|
|||||||
|
|
||||||
void
|
void
|
||||||
fail(std::string what, error_code ec,
|
fail(std::string what, error_code ec,
|
||||||
int id, endpoint_type const& ep)
|
std::size_t id, endpoint_type const& ep)
|
||||||
{
|
{
|
||||||
if(log_)
|
if(log_)
|
||||||
if(ec != beast::websocket::error::closed)
|
if(ec != beast::websocket::error::closed)
|
||||||
|
Reference in New Issue
Block a user