summaryrefslogtreecommitdiffstats
path: root/api
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2020-12-14 12:42:19 +0100
committerSven Gothel <[email protected]>2020-12-14 12:42:19 +0100
commit7a5886cc138971f67de3fb4ba95227ee87ffd437 (patch)
tree1464bc2f1f731b268039368e9d5981b1d5805968 /api
parent2157c1cf56140aceade31a63b450828d766a7f51 (diff)
smart_ptr-5: Use std::make_shared<T>(..) where possible, reducing two memory allocations to one
smart_ptr change series, commit #5 This series started with commit cafd8d1f3689135eae36854a9cca4def690045fd, see for details.
Diffstat (limited to 'api')
-rw-r--r--api/direct_bt/DBTManager.hpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/api/direct_bt/DBTManager.hpp b/api/direct_bt/DBTManager.hpp
index 5e5ddb1c..e35522f6 100644
--- a/api/direct_bt/DBTManager.hpp
+++ b/api/direct_bt/DBTManager.hpp
@@ -204,6 +204,9 @@ namespace direct_bt {
uint16_t dev_id;
BDAddressAndType address_and_type;
HCIWhitelistConnectType ctype;
+
+ WhitelistElem(uint16_t dev_id_, BDAddressAndType address_and_type_, HCIWhitelistConnectType ctype_)
+ : dev_id(dev_id_), address_and_type(address_and_type_), ctype(ctype_) { }
};
std::vector<std::shared_ptr<WhitelistElem>> whitelist;