diff options
Diffstat (limited to 'src/direct_bt/DBTDevice.cpp')
-rw-r--r-- | src/direct_bt/DBTDevice.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/direct_bt/DBTDevice.cpp b/src/direct_bt/DBTDevice.cpp index 60098ec2..5a558751 100644 --- a/src/direct_bt/DBTDevice.cpp +++ b/src/direct_bt/DBTDevice.cpp @@ -1252,7 +1252,7 @@ bool DBTDevice::connectSMP(std::shared_ptr<DBTDevice> sthis, const BTSecurityLev smpHandler = nullptr; } - smpHandler = std::shared_ptr<SMPHandler>(new SMPHandler(sthis)); + smpHandler = std::make_shared<SMPHandler>(sthis); if( !smpHandler->isConnected() ) { ERR_PRINT("DBTDevice::connectSMP: Connection failed"); smpHandler = nullptr; @@ -1297,7 +1297,7 @@ bool DBTDevice::connectGATT(std::shared_ptr<DBTDevice> sthis) noexcept { gattHandler = nullptr; } - gattHandler = std::shared_ptr<GATTHandler>(new GATTHandler(sthis, l2cap_att)); + gattHandler = std::make_shared<GATTHandler>(sthis, l2cap_att); if( !gattHandler->isConnected() ) { ERR_PRINT2("DBTDevice::connectGATT: Connection failed"); gattHandler = nullptr; |