Skip to content

Commit 9bd423e

Browse files
authored
Change parameter and variable to int
As of wrong paramater, the following problem existed, that will be fixed now with this change. BTScanResultsSet.cpp:67:8: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits] if (i < 0)
1 parent 3f9ca97 commit 9bd423e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

libraries/BluetoothSerial/src/BTScanResultsSet.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,11 @@ int BTScanResultsSet::getCount() {
6363
* @param [in] i The index of the device.
6464
* @return The device at the specified index.
6565
*/
66-
BTAdvertisedDevice* BTScanResultsSet::getDevice(uint32_t i) {
66+
BTAdvertisedDevice* BTScanResultsSet::getDevice(int i) {
6767
if (i < 0)
6868
return nullptr;
6969

70-
uint32_t x = 0;
70+
int x = 0;
7171
BTAdvertisedDeviceSet* pDev = &m_vectorAdvertisedDevices.begin()->second;
7272
for (auto it = m_vectorAdvertisedDevices.begin(); it != m_vectorAdvertisedDevices.end(); it++) {
7373
pDev = &it->second;
@@ -92,4 +92,4 @@ bool BTScanResultsSet::add(BTAdvertisedDeviceSet advertisedDevice, bool unique)
9292
return false;
9393
}
9494

95-
#endif
95+
#endif

0 commit comments

Comments
 (0)