From 34bc326eab06b9b1da2004a9e0d2182d63501d68 Mon Sep 17 00:00:00 2001 From: lichao <lichao@aiotlink.com> Date: 星期五, 14 五月 2021 17:57:49 +0800 Subject: [PATCH] change SendQ data from variant to int64. --- src/sendq.cpp | 10 +--------- 1 files changed, 1 insertions(+), 9 deletions(-) diff --git a/src/sendq.cpp b/src/sendq.cpp index 94e315e..1eaefe6 100644 --- a/src/sendq.cpp +++ b/src/sendq.cpp @@ -34,17 +34,9 @@ if (info.on_expire_) { info.on_expire_(info.data_); } - if (info.data_.index() == 0) { - boost::variant2::get<0>(info.data_).Release(); - } } - auto SendData = [&](Data &d) { - auto TrySend = [&](auto &&data) { return mq.TrySend(remote, data); }; - return boost::variant2::visit(TrySend, pos->data().data_); - }; - - while (pos != arr.end() && SendData(pos->data().data_)) { + while (pos != arr.end() && mq.TrySend(remote, pos->data().data_)) { ++pos; } -- Gitblit v1.8.0