From 57c8e5916dd8b83fc4fb720aee417a138a0d9e19 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Mon, 9 May 2022 01:50:30 +0200 Subject: Use typedef of shared_pre 'TRef' and pass `const shared_pre&` where possible --- src/direct_bt/BTDevice.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/direct_bt/BTDevice.cpp') diff --git a/src/direct_bt/BTDevice.cpp b/src/direct_bt/BTDevice.cpp index efbabb4f..351184f8 100644 --- a/src/direct_bt/BTDevice.cpp +++ b/src/direct_bt/BTDevice.cpp @@ -116,17 +116,17 @@ std::string const BTDevice::getName() const noexcept { return res; } -std::shared_ptr BTDevice::getEIR() noexcept { +EInfoReportRef BTDevice::getEIR() noexcept { const std::lock_guard lock(mtx_eir); // RAII-style acquire and relinquish via destructor return eir; } -std::shared_ptr BTDevice::getEIRInd() noexcept { +EInfoReportRef BTDevice::getEIRInd() noexcept { const std::lock_guard lock(mtx_eir); // RAII-style acquire and relinquish via destructor return eir_ind; } -std::shared_ptr BTDevice::getEIRScanRsp() noexcept { +EInfoReportRef BTDevice::getEIRScanRsp() noexcept { const std::lock_guard lock(mtx_eir); // RAII-style acquire and relinquish via destructor return eir_scan_rsp; } @@ -256,11 +256,11 @@ EIRDataType BTDevice::update(GattGenericAccessSvc const &data, const uint64_t ti return res; } -bool BTDevice::addStatusListener(std::shared_ptr l) { +bool BTDevice::addStatusListener(const AdapterStatusListenerRef& l) { return adapter.addStatusListener(*this, l); } -bool BTDevice::removeStatusListener(std::shared_ptr l) { +bool BTDevice::removeStatusListener(const AdapterStatusListenerRef& l) { return adapter.removeStatusListener(l); } -- cgit v1.2.3