diff options
author | Sven Gothel <[email protected]> | 2020-10-20 08:18:11 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2020-10-20 08:18:11 +0200 |
commit | bc5b9519034edfa7a24a6667d183f3a3b01f3867 (patch) | |
tree | d18e96cef8286dfc6bc20e1f8e8e71b360aba1fd /src/direct_bt/GATTNumbers.cpp | |
parent | aa43800a7722940ac1a902b088a6900e29efd0c9 (diff) |
Small footprint compromise: Use jau::nsize_t and jau::snsize_t where appropriate
Revises commit 1f6e924fe05ed45bfa4d0d901af2c4df6c1abab5
Use jau::nsize_t and jau::snsize_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 6fec1bd9..80fba5da 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 size_t str_len = v.getSize(); + const jau::nsize_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 size_t reqSize = 8; + const jau::nsize_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 size_t reqSize = 7; + const jau::nsize_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 size_t size = source.getSize(); - size_t reqSize = 1 + 4; // max size = 13 + const jau::nsize_t size = source.getSize(); + jau::nsize_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()); |