Skip to content

Commit

Permalink
Merge pull request #3713 from mdionisio/useless_ceil
Browse files Browse the repository at this point in the history
avoid to use std::ceil
  • Loading branch information
bluca authored Oct 14, 2019
2 parents c1ff4c2 + f07f47b commit 683bf1d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
13 changes: 13 additions & 0 deletions RELICENSE/mdionisio.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# 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
6 changes: 1 addition & 5 deletions src/decoder_allocators.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand All @@ -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)
{
}

Expand Down

0 comments on commit 683bf1d

Please sign in to comment.