optimizations

This commit is contained in:
proddy
2024-10-02 14:01:02 +02:00
parent 5d1c007777
commit 2528e15a9c
6 changed files with 83 additions and 116 deletions

View File

@@ -285,7 +285,8 @@ class RxService : public EMSbus {
const std::shared_ptr<const Telegram> telegram_;
~QueuedRxTelegram() = default;
QueuedRxTelegram(uint16_t id, std::shared_ptr<Telegram> && telegram)
// TODO check if still works without std::shared_ptr<Telegram> && telegram
QueuedRxTelegram(uint16_t id, std::shared_ptr<Telegram> telegram)
: id_(id)
, telegram_(std::move(telegram)) {
}
@@ -414,7 +415,8 @@ class TxService : public EMSbus {
const uint16_t validateid_;
~QueuedTxTelegram() = default;
QueuedTxTelegram(uint16_t id, std::shared_ptr<Telegram> && telegram, bool retry, uint16_t validateid)
// TODO test this refactor, removing && from std::shared_ptr<Telegram> && telegram
QueuedTxTelegram(uint16_t id, std::shared_ptr<Telegram> telegram, bool retry, uint16_t validateid)
: id_(id)
, telegram_(std::move(telegram))
, retry_(retry)