Unverified Commit 683bf1d7 authored by Luca Boccassi's avatar Luca Boccassi Committed by GitHub

Merge pull request #3713 from mdionisio/useless_ceil

avoid to use std::ceil
parents c1ff4c2b f07f47b1
# Permission to Relicense under MPLv2
This is a statement by Thomas M. DuBuisson
that grants permission to relicense its copyrights in the libzmq C++
library (ZeroMQ) under the Mozilla Public License v2 (MPLv2).
A portion of the commits made by the Github handle "mdionisio", with
commit author "Michele Dionisio", are copyright of Michele Dionisio.
This document hereby grants the libzmq project team to relicense libzmq,
including all past, present and future contributions of the author listed above.
Michele Dionisio
2019/07/09
......@@ -30,8 +30,6 @@
#include "precompiled.hpp"
#include "decoder_allocators.hpp"
#include <cmath>
#include "msg.hpp"
zmq::shared_message_memory_allocator::shared_message_memory_allocator (
......@@ -40,9 +38,7 @@ zmq::shared_message_memory_allocator::shared_message_memory_allocator (
_buf_size (0),
_max_size (bufsize_),
_msg_content (NULL),
_max_counters (static_cast<size_t> (
std::ceil (static_cast<double> (_max_size)
/ static_cast<double> (msg_t::max_vsm_size))))
_max_counters ((_max_size + msg_t::max_vsm_size - 1) / msg_t::max_vsm_size)
{
}
......
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