Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-Authored-By: gummif <[email protected]>
  • Loading branch information
sigiesec and gummif authored May 8, 2019
1 parent 3d4be81 commit 9a60ad3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion tests/socket.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ TEST_CASE("socket swap", "[socket]")
}
TEST_CASE("rass", "[socket]")
{
zmq::context_t ctx;
zmq::context_t ctx;
zmq::socket_t sock(ctx, zmq::socket_type::push);
sock.bind("inproc://test");
const std::string m = "Hello, world";
Expand Down
5 changes: 3 additions & 2 deletions zmq.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ class message_t
}

#if defined(ZMQ_BUILD_DRAFT_API) && defined(ZMQ_CPP11)
// this function is too greedy, must add
// TODO: this function is too greedy, must add
// SFINAE for begin and end support.
template<typename T>
explicit message_t(const T &msg_) : message_t(std::begin(msg_), std::end(msg_))
Expand Down Expand Up @@ -654,7 +654,8 @@ enum class send_flags : int

constexpr send_flags operator|(send_flags a, send_flags b) noexcept
{
return static_cast<send_flags>(static_cast<int>(a) | static_cast<int>(b));
return static_cast<send_flags>(static_cast<std::underlying_type<send_flags>::type>(a)
| static_cast<<std::underlying_type<send_flags>::type>(b));
}

enum class recv_flags : int
Expand Down

0 comments on commit 9a60ad3

Please sign in to comment.