diff options
author | Sven Gothel <[email protected]> | 2020-09-12 15:20:37 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2020-09-12 15:20:37 +0200 |
commit | 22fbf43bf956b5cebabaee326dfe625333bce0f6 (patch) | |
tree | 39301dfa871e32c6cb015e5ea83c2a2cd71a3d8e /src | |
parent | 1422a7f0f3c846f71af1eb0ac610a3a9950f9ac2 (diff) |
Use [[fallthrough]] instead of comment
Diffstat (limited to 'src')
-rw-r--r-- | src/direct_bt/BTTypes.cpp | 8 | ||||
-rw-r--r-- | src/direct_bt/DBTDevice.cpp | 2 | ||||
-rw-r--r-- | src/direct_bt/DBTManager.cpp | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/src/direct_bt/BTTypes.cpp b/src/direct_bt/BTTypes.cpp index e8ca71d2..6310a1a2 100644 --- a/src/direct_bt/BTTypes.cpp +++ b/src/direct_bt/BTTypes.cpp @@ -45,9 +45,9 @@ BDAddressType direct_bt::getBDAddressType(const HCILEPeerAddressType hciPeerAddr case HCILEPeerAddressType::PUBLIC: return BDADDR_LE_PUBLIC; case HCILEPeerAddressType::RANDOM: - /* fall through intended */ + [[fallthrough]]; case HCILEPeerAddressType::PUBLIC_IDENTITY: - /* fall through intended */ + [[fallthrough]]; case HCILEPeerAddressType::RANDOM_STATIC_IDENTITY: return BDADDR_LE_RANDOM; default: @@ -75,9 +75,9 @@ BDAddressType direct_bt::getBDAddressType(const HCILEOwnAddressType hciOwnAddrTy case HCILEOwnAddressType::PUBLIC: return BDADDR_LE_PUBLIC; case HCILEOwnAddressType::RANDOM: - /* fall through intended */ + [[fallthrough]]; case HCILEOwnAddressType::RESOLVABLE_OR_PUBLIC: - /* fall through intended */ + [[fallthrough]]; case HCILEOwnAddressType::RESOLVABLE_OR_RANDOM: return BDADDR_LE_RANDOM; default: diff --git a/src/direct_bt/DBTDevice.cpp b/src/direct_bt/DBTDevice.cpp index b2ddffeb..a010be4a 100644 --- a/src/direct_bt/DBTDevice.cpp +++ b/src/direct_bt/DBTDevice.cpp @@ -384,7 +384,7 @@ HCIStatusCode DBTDevice::connectDefault() { switch( addressType ) { case BDAddressType::BDADDR_LE_PUBLIC: - /* fall through intended */ + [[fallthrough]]; case BDAddressType::BDADDR_LE_RANDOM: return connectLE(); case BDAddressType::BDADDR_BREDR: diff --git a/src/direct_bt/DBTManager.cpp b/src/direct_bt/DBTManager.cpp index c678ea34..47dbffe0 100644 --- a/src/direct_bt/DBTManager.cpp +++ b/src/direct_bt/DBTManager.cpp @@ -238,7 +238,7 @@ std::shared_ptr<AdapterInfo> DBTManager::initAdapter(const uint16_t dev_id, cons setAdapterMode(dev_id, 1 /* ssp */, 1 /* bredr */, 0 /* le */); break; case BTMode::NONE: - // fall through intended, map NONE -> LE + [[fallthrough]]; // map NONE -> LE case BTMode::LE: setAdapterMode(dev_id, 0 /* ssp */, 0 /* bredr */, 1 /* le */); break; |