mirror of
https://github.com/boostorg/mqtt5.git
synced 2025-08-01 05:24:50 +02:00
Add Jamfile, make CMake scripts Boost compliant
Summary: related to T15996 Reviewers: ivica, korina Reviewed By: ivica Subscribers: iljazovic, miljen Differential Revision: https://repo.mireo.local/D33480
This commit is contained in:
@@ -20,9 +20,7 @@
|
||||
#include <boost/asio/require.hpp>
|
||||
#include <boost/system/error_code.hpp>
|
||||
|
||||
#include <atomic>
|
||||
#include <deque>
|
||||
#include <mutex>
|
||||
|
||||
namespace boost::mqtt5::detail {
|
||||
|
||||
|
@@ -10,6 +10,7 @@
|
||||
|
||||
#include <boost/mqtt5/types.hpp>
|
||||
|
||||
#include <boost/assert.hpp>
|
||||
#include <boost/smart_ptr/allocate_unique.hpp>
|
||||
|
||||
#include <algorithm>
|
||||
@@ -109,13 +110,13 @@ public:
|
||||
}
|
||||
|
||||
qos_e qos() const {
|
||||
assert(control_code() == control_code_e::publish);
|
||||
BOOST_ASSERT(control_code() == control_code_e::publish);
|
||||
auto byte = (uint8_t(*(_packet->data())) & 0b00000110) >> 1;
|
||||
return qos_e(byte);
|
||||
}
|
||||
|
||||
control_packet& set_dup() {
|
||||
assert(control_code() == control_code_e::publish);
|
||||
BOOST_ASSERT(control_code() == control_code_e::publish);
|
||||
auto& byte = *(_packet->data());
|
||||
byte |= 0b00001000;
|
||||
return *this;
|
||||
|
@@ -1,3 +1,10 @@
|
||||
//
|
||||
// Copyright (c) 2025 Ivica Siladic, Bruno Iljazovic, Korina Simicevic
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
|
||||
#ifndef BOOST_MQTT5_SHUTDOWN_HPP
|
||||
#define BOOST_MQTT5_SHUTDOWN_HPP
|
||||
|
||||
|
@@ -21,6 +21,7 @@
|
||||
#include <boost/asio/completion_condition.hpp>
|
||||
#include <boost/asio/post.hpp>
|
||||
#include <boost/asio/prepend.hpp>
|
||||
#include <boost/assert.hpp>
|
||||
#include <boost/system/error_code.hpp>
|
||||
|
||||
#include <chrono>
|
||||
@@ -148,7 +149,7 @@ public:
|
||||
return complete(ec, 0, {}, {});
|
||||
|
||||
_data_span.expand_suffix(bytes_read);
|
||||
assert(_data_span.size());
|
||||
BOOST_ASSERT(_data_span.size());
|
||||
|
||||
auto control_byte = uint8_t(*_data_span.first());
|
||||
|
||||
@@ -187,7 +188,7 @@ private:
|
||||
auto negotiated_ka = _svc.negotiated_keep_alive();
|
||||
return negotiated_ka ?
|
||||
std::chrono::milliseconds(3 * negotiated_ka * 1000 / 2) :
|
||||
duration(std::numeric_limits<duration::rep>::max());
|
||||
duration((std::numeric_limits<duration::rep>::max)());
|
||||
}
|
||||
|
||||
static bool valid_header(uint8_t control_byte) {
|
||||
|
@@ -277,7 +277,7 @@ private:
|
||||
_replies(_executor),
|
||||
_async_sender(*this),
|
||||
_active_span(_read_buff.cend(), _read_buff.cend()),
|
||||
_rec_channel(_executor, std::numeric_limits<size_t>::max()),
|
||||
_rec_channel(_executor, (std::numeric_limits<size_t>::max)()),
|
||||
_ping_timer(_executor),
|
||||
_sentry_timer(_executor)
|
||||
{
|
||||
@@ -297,7 +297,7 @@ public:
|
||||
_replies(ex),
|
||||
_async_sender(*this),
|
||||
_active_span(_read_buff.cend(), _read_buff.cend()),
|
||||
_rec_channel(ex, std::numeric_limits<size_t>::max()),
|
||||
_rec_channel(ex, (std::numeric_limits<size_t>::max)()),
|
||||
_ping_timer(ex),
|
||||
_sentry_timer(ex)
|
||||
{}
|
||||
|
@@ -96,7 +96,7 @@ private:
|
||||
auto negotiated_ka = _svc_ptr->negotiated_keep_alive();
|
||||
return negotiated_ka ?
|
||||
std::chrono::seconds(negotiated_ka) :
|
||||
duration(std::numeric_limits<duration::rep>::max());
|
||||
duration((std::numeric_limits<duration::rep>::max)());
|
||||
}
|
||||
|
||||
void complete() {
|
||||
|
@@ -21,6 +21,7 @@
|
||||
#include <boost/asio/error.hpp>
|
||||
#include <boost/asio/prepend.hpp>
|
||||
#include <boost/asio/recycling_allocator.hpp>
|
||||
#include <boost/assert.hpp>
|
||||
|
||||
#include <cstdint>
|
||||
#include <memory>
|
||||
@@ -146,7 +147,7 @@ private:
|
||||
}
|
||||
break;
|
||||
default:
|
||||
assert(false);
|
||||
BOOST_ASSERT(false);
|
||||
}
|
||||
|
||||
perform();
|
||||
|
@@ -222,7 +222,7 @@ private:
|
||||
|
||||
std::clog << property_name(prop) << ":";
|
||||
std::clog << "[";
|
||||
for (auto i = 0; i < val.size(); i++) {
|
||||
for (size_t i = 0; i < val.size(); i++) {
|
||||
if constexpr (detail::is_pair<decltype(val[i])>)
|
||||
std::clog << "(" << val[i].first << "," << val[i].second << ")";
|
||||
else
|
||||
|
Reference in New Issue
Block a user