Commit 9ae61d16 authored by Dominik Charousset's avatar Dominik Charousset

Fix build on compilers that evaluate right-to-left

parent 228c4c59
......@@ -89,7 +89,8 @@ public:
if (i != e && force_underfull) {
std::vector<type> tmp{std::make_move_iterator(i),
std::make_move_iterator(e)};
emit_batch(self, tmp.size(), make_message(std::move(tmp)));
auto tmp_size = static_cast<long>(tmp.size());
emit_batch(self, tmp_size, make_message(std::move(tmp)));
return e;
}
return i;
......
......@@ -58,6 +58,8 @@ void outbound_path::emit_open(local_actor* self, stream_slot slot,
void outbound_path::emit_batch(local_actor* self, long xs_size, message xs) {
CAF_LOG_TRACE(CAF_ARG(slots) << CAF_ARG(xs_size) << CAF_ARG(xs));
CAF_ASSERT(xs_size > 0);
CAF_ASSERT(xs_size <= std::numeric_limits<int32_t>::max());
CAF_ASSERT(open_credit >= xs_size);
open_credit -= xs_size;
auto bid = next_batch_id++;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment