From f07f47b1e3f78f781ca58a3008491cb7a740c0f3 Mon Sep 17 00:00:00 2001 From: Michele Dionisio Date: Mon, 14 Oct 2019 15:22:33 +0200 Subject: [PATCH] avoid to use ceil function ceil function is usually in math library that can be avoided as dependency --- src/decoder_allocators.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/decoder_allocators.cpp b/src/decoder_allocators.cpp index c77b905d..078d294a 100644 --- a/src/decoder_allocators.cpp +++ b/src/decoder_allocators.cpp @@ -30,8 +30,6 @@ #include "precompiled.hpp" #include "decoder_allocators.hpp" -#include - #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 ( - std::ceil (static_cast (_max_size) - / static_cast (msg_t::max_vsm_size)))) + _max_counters ((_max_size + msg_t::max_vsm_size - 1) / msg_t::max_vsm_size) { }