adafruit / Adafruit_nRF52_Arduino

Adafruit code for the Nordic nRF52 BLE SoC on Arduino
Other
598 stars 488 forks source link

Line 199, BLEScanner::checkReportForUuid -- Remove const specifier fr… #809

Closed ScottCase-Stemco closed 5 months ago

ScottCase-Stemco commented 5 months ago

…om uuid variable.

The local variable uuid in function bool BLEScanner::checkReportForUuid was defined as const, but it was not initialized with a value and is later assigned one (on lines 210 or 216). A const variable must be declared with an initial value, which cannot be changed. What is needed here is not a const value, but a cast where uuid was assigned a value. This was done correctly in one spot, but not on the other.

ScottCase-Stemco commented 5 months ago

Thanks for the explanation, hathatch!