From e48a88275f22e5d05d8d775daf0c984953155418 Mon Sep 17 00:00:00 2001 From: bernatx Date: Wed, 20 Jul 2022 17:00:48 +0200 Subject: [PATCH] Fixes for compilation from Jenkins --- LibCarla/source/carla/multigpu/primary.cpp | 9 ++------- LibCarla/source/carla/multigpu/primaryCommands.cpp | 2 +- LibCarla/source/carla/multigpu/router.h | 2 +- LibCarla/source/carla/multigpu/secondary.cpp | 8 ++++---- 4 files changed, 8 insertions(+), 13 deletions(-) diff --git a/LibCarla/source/carla/multigpu/primary.cpp b/LibCarla/source/carla/multigpu/primary.cpp index 87988878e..2eae23550 100644 --- a/LibCarla/source/carla/multigpu/primary.cpp +++ b/LibCarla/source/carla/multigpu/primary.cpp @@ -104,23 +104,18 @@ namespace multigpu { return; } - auto handle_sent = [weak](const boost::system::error_code &ec, size_t DEBUG_ONLY(bytes)) { - // auto self = weak.lock(); - // if (!self) return; - }; - // sent first size buffer self->_deadline.expires_from_now(self->_timeout); int this_size = text.size(); boost::asio::async_write( self->_socket, boost::asio::buffer(&this_size, sizeof(this_size)), - boost::asio::bind_executor(self->_strand, [](const boost::system::error_code &ec, size_t bytes){ })); + boost::asio::bind_executor(self->_strand, [](const boost::system::error_code &, size_t bytes){ })); // send characters boost::asio::async_write( self->_socket, boost::asio::buffer(text.c_str(), text.size()), - boost::asio::bind_executor(self->_strand, handle_sent)); + boost::asio::bind_executor(self->_strand, [](const boost::system::error_code &, size_t bytes){ })); }); } diff --git a/LibCarla/source/carla/multigpu/primaryCommands.cpp b/LibCarla/source/carla/multigpu/primaryCommands.cpp index c237f90f0..285183d62 100644 --- a/LibCarla/source/carla/multigpu/primaryCommands.cpp +++ b/LibCarla/source/carla/multigpu/primaryCommands.cpp @@ -31,7 +31,7 @@ void PrimaryCommands::SendFrameData(carla::Buffer buffer) { } // broadcast to all secondary servers the map to load -void PrimaryCommands::SendLoadMap(std::string map) { +void PrimaryCommands::SendLoadMap(std::string) { // carla::Buffer buf((unsigned char *) map.c_str(), (size_t) map.size()); log_info("sending load map command"); } diff --git a/LibCarla/source/carla/multigpu/router.h b/LibCarla/source/carla/multigpu/router.h index acf6ccda9..61e3d88c9 100644 --- a/LibCarla/source/carla/multigpu/router.h +++ b/LibCarla/source/carla/multigpu/router.h @@ -66,7 +66,7 @@ namespace multigpu { boost::asio::ip::tcp::endpoint _endpoint; std::vector> _sessions; std::shared_ptr _listener; - int _next; + uint _next; std::unordered_map>> _promises; PrimaryCommands _commander; }; diff --git a/LibCarla/source/carla/multigpu/secondary.cpp b/LibCarla/source/carla/multigpu/secondary.cpp index a414cbaf4..f123ec112 100644 --- a/LibCarla/source/carla/multigpu/secondary.cpp +++ b/LibCarla/source/carla/multigpu/secondary.cpp @@ -28,12 +28,12 @@ namespace multigpu { boost::asio::ip::tcp::endpoint ep, SecondaryCommands::callback_type callback) : _pool(), - _endpoint(ep), - _buffer_pool(std::make_shared()), _socket(_pool.io_context()), + _endpoint(ep), _strand(_pool.io_context()), - _connection_timer(_pool.io_context()) { - + _connection_timer(_pool.io_context()), + _buffer_pool(std::make_shared()) { + _commander.set_callback(callback); }