diff options
author | Sven Gothel <[email protected]> | 2022-11-27 14:04:40 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2022-11-27 14:04:40 +0100 |
commit | 5998a10ae6d20704569a4c4f4de35dd78d4ca163 (patch) | |
tree | 33626c0bc0f2468d5fbb960486d53f0467352463 /examples | |
parent | cc49c8bf94b5b9b557cb2caf7b379df0660604af (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 'examples')
-rw-r--r-- | examples/java/DBTPeripheral00.java | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/examples/java/DBTPeripheral00.java b/examples/java/DBTPeripheral00.java index 9712e9c3..107bf7a5 100644 --- a/examples/java/DBTPeripheral00.java +++ b/examples/java/DBTPeripheral00.java @@ -37,7 +37,6 @@ import org.direct_bt.BTMode; import org.direct_bt.BTSecurityLevel; import org.direct_bt.BTAdapter; import org.direct_bt.BTDevice; -import org.direct_bt.BTDeviceRegistry; import org.direct_bt.BTException; import org.direct_bt.BTFactory; import org.direct_bt.BTManager; @@ -358,7 +357,7 @@ public class DBTPeripheral00 { } }; - class MyGATTServerListener extends DBGattServer.Listener implements AutoCloseable { + class MyGATTServerListener extends DBGattServer.Listener { private final Thread pulseSenderThread; private volatile boolean stopPulseSenderFlag = false; |