diff options
author | Avamander <avamander@gmail.com> | 2021-12-01 21:11:31 +0200 |
---|---|---|
committer | Avamander <avamander@gmail.com> | 2021-12-04 22:03:40 +0200 |
commit | ffd6c3f0953c753b0caf151be1eb824bdd777264 (patch) | |
tree | 8c3353c6155a46c19f535c916170e96ddafdc4ca /src/components/ble | |
parent | b72c6a5bc97c786a295136742d89e6c14e1ccd72 (diff) |
Removed an instance of shadowing
Diffstat (limited to 'src/components/ble')
-rw-r--r-- | src/components/ble/weather/WeatherService.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/components/ble/weather/WeatherService.cpp b/src/components/ble/weather/WeatherService.cpp index c2a1cec0..e6d22d71 100644 --- a/src/components/ble/weather/WeatherService.cpp +++ b/src/components/ble/weather/WeatherService.cpp @@ -79,12 +79,12 @@ namespace Pinetime { airquality->eventType = static_cast<WeatherData::eventtype>(tmpEventType); airquality->expires = tmpExpires; - UsefulBufC String; // TODO: Everything ok with lifecycle here? - QCBORDecode_GetTextStringInMapSZ(&decodeContext, "Polluter", &String); - if (UsefulBuf_IsNULLOrEmptyC(String) != 0) { + UsefulBufC stringBuf; // TODO: Everything ok with lifecycle here? + QCBORDecode_GetTextStringInMapSZ(&decodeContext, "Polluter", &stringBuf); + if (UsefulBuf_IsNULLOrEmptyC(stringBuf) != 0) { return BLE_ATT_ERR_INVALID_ATTR_VALUE_LEN; } - airquality->polluter = std::string(static_cast<const char*>(String.ptr), String.len); + airquality->polluter = std::string(static_cast<const char*>(stringBuf.ptr), stringBuf.len); int64_t tmpAmount = 0; QCBORDecode_GetInt64InMapSZ(&decodeContext, "Amount", &tmpAmount); |