diff options
author | Sven Gothel <[email protected]> | 2020-10-20 05:44:37 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2020-10-20 05:44:37 +0200 |
commit | 1f6e924fe05ed45bfa4d0d901af2c4df6c1abab5 (patch) | |
tree | 3e7bb612dcf35b5ef3cff10b46f4fbc95236ad6f /src/direct_bt/GATTNumbers.cpp | |
parent | 2e40a6fbb84ef21bb9551c653199964e55d7954b (diff) |
Normalize: Use size_t where appropriate; timestamp is uint64_t
timestamp is uint64_t
- AttPDUMsg
Use size_t where appropriate
- OctetTypes.hpp: TROOctets*
- ATTPDUTypes.hpp: AttPDUMsg*
- HCITypes.hpp: HCIPacket*
- HCIComm.hpp: HCIComm
- L2CAPComm.hpp: L2CAPComm
- MgmtTypes.hpp: MgmtCommand*, MgmtEvent*
- UUID.hpp: uuid_t
- DBTManager, GATTHandler, HCIHandler
- HCIComm.hpp: HCIComm
- BTTypes.hpp
- DBTTypes.hpp
Diffstat (limited to 'src/direct_bt/GATTNumbers.cpp')
-rw-r--r-- | src/direct_bt/GATTNumbers.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/direct_bt/GATTNumbers.cpp b/src/direct_bt/GATTNumbers.cpp index 17448320..6fec1bd9 100644 --- a/src/direct_bt/GATTNumbers.cpp +++ b/src/direct_bt/GATTNumbers.cpp @@ -347,7 +347,7 @@ const GattCharacteristicSpec * direct_bt::findGattCharSpec(const uint16_t uuid16 /********************************************************/ std::string direct_bt::GattNameToString(const TROOctets &v) noexcept { - const int str_len = v.getSize(); + const size_t str_len = v.getSize(); if( 0 == str_len ) { return std::string(); // empty } @@ -364,7 +364,7 @@ GattPeriphalPreferredConnectionParameters::GattPeriphalPreferredConnectionParame } std::shared_ptr<GattPeriphalPreferredConnectionParameters> GattPeriphalPreferredConnectionParameters::get(const TROOctets &source) noexcept { - const int reqSize = 8; + const size_t reqSize = 8; if( source.getSize() < reqSize ) { ERR_PRINT("GattPeriphalPreferredConnectionParameters: Insufficient data, less than %d bytes in %s", reqSize, source.toString().c_str()); return nullptr; @@ -389,7 +389,7 @@ GattPnP_ID::GattPnP_ID(const TROOctets &source) noexcept product_id(source.get_uint16(3)), product_version(source.get_uint16(5)) {} std::shared_ptr<GattPnP_ID> GattPnP_ID::get(const TROOctets &source) noexcept { - const int reqSize = 7; + const size_t reqSize = 7; if( source.getSize() < reqSize ) { ERR_PRINT("GattPnP_ID: Insufficient data, less than %d bytes in %s", reqSize, source.toString().c_str()); return nullptr; @@ -412,8 +412,8 @@ std::string GattDeviceInformationSvc::toString() const noexcept { } std::shared_ptr<GattTemperatureMeasurement> GattTemperatureMeasurement::get(const TROOctets &source) noexcept { - const int size = source.getSize(); - int reqSize = 1 + 4; // max size = 13 + const size_t size = source.getSize(); + size_t reqSize = 1 + 4; // max size = 13 if( reqSize > size ) { // min size: flags + temperatureValue ERR_PRINT("GattTemperatureMeasurement: Insufficient data, less than %d bytes in %s", reqSize, source.toString().c_str()); |