Reformat code

This commit is contained in:
badaix 2020-06-11 13:41:28 +02:00
parent 1aee05cead
commit 9fcfe09a9a

View file

@ -61,7 +61,7 @@ public:
/// @param value the response message /// @param value the response message
void setValue(std::unique_ptr<msg::BaseMessage> value) void setValue(std::unique_ptr<msg::BaseMessage> value)
{ {
boost::asio::post(strand_, [this, self = shared_from_this(), val = std::move(value)]() mutable { boost::asio::post(strand_, [ this, self = shared_from_this(), val = std::move(value) ]() mutable {
timer_.cancel(); timer_.cancel();
if (handler_) if (handler_)
handler_({}, std::move(val)); handler_({}, std::move(val));
@ -79,7 +79,7 @@ public:
void startTimer(const chronos::usec& timeout) void startTimer(const chronos::usec& timeout)
{ {
timer_.expires_after(timeout); timer_.expires_after(timeout);
timer_.async_wait(boost::asio::bind_executor(strand_, [this, self = shared_from_this()](boost::system::error_code ec) { timer_.async_wait(boost::asio::bind_executor(strand_, [ this, self = shared_from_this() ](boost::system::error_code ec) {
if (!handler_) if (!handler_)
return; return;
if (!ec) if (!ec)