mirror of
https://github.com/zeromq/libzmq.git
synced 2025-03-01 10:57:59 +01:00
avoid to use ceil function
ceil function is usually in math library that can be avoided as dependency
This commit is contained in:
parent
f370cc0070
commit
f07f47b1e3
@ -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)
|
||||
{
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user