aboutsummaryrefslogtreecommitdiffstats
path: root/src/direct_bt/DBGattServer.cpp
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2022-11-27 14:04:40 +0100
committerSven Gothel <[email protected]>2022-11-27 14:04:40 +0100
commit5998a10ae6d20704569a4c4f4de35dd78d4ca163 (patch)
tree33626c0bc0f2468d5fbb960486d53f0467352463 /src/direct_bt/DBGattServer.cpp
parentcc49c8bf94b5b9b557cb2caf7b379df0660604af (diff)
clang-tidy fixes part-1
Details - Use 'size_type' instead of 'int', propagate same 'size_type' into 'darray' etc. - Use 'std::make_shared', 'std::make_unique' - Use range-based for loops - Remove redundant 'virtual', use 'override' in derived classes - Use 'nullptr' - Use default impl for dtor, ctor (incomplete) - Use copy and std::move (incomplete) - Explcitly catch std::bad_alloc in 'new' in 'noexcept' -> 'abort' - 'abort' was issued implicitly in noexcept methods - L2CAPServer, L2CAPClient, NopGattServerHandler, DBGattServerHandler, FwdGattServerHandler - Use local close_impl(), usable in virtual destructor - L2CAPClient::read, HCIComm::read - preset 'poll' result 'n', avoid garbage comparison - BTAdapter::enableListening - loop through addMgmtEventCallback() result - JNI code - explicit size_type is cast to jsize or jint w/o check - unchanged semantics
Diffstat (limited to 'src/direct_bt/DBGattServer.cpp')
-rw-r--r--src/direct_bt/DBGattServer.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/direct_bt/DBGattServer.cpp b/src/direct_bt/DBGattServer.cpp
index fd37ad6d..80a136e1 100644
--- a/src/direct_bt/DBGattServer.cpp
+++ b/src/direct_bt/DBGattServer.cpp
@@ -96,7 +96,7 @@ bool DBGattServer::removeListener(ListenerRef l) {
ERR_PRINT("Listener ref is null");
return false;
}
- const int count = listenerList.erase_matching(l, false /* all_matching */, _listenerRefEqComparator);
+ const auto count = listenerList.erase_matching(l, false /* all_matching */, _listenerRefEqComparator);
return count > 0;
}