fix a lot of low level cppcheck warnings (#9623)

* simplify the observer pattern, since all the called functions are const getters.
* use arduino macro over std: for numerical values and refactor local variables in drawScrollbar()
* oh, so Cppcheck actually complained about const pointers not being const.
* slowly getting out of ifdef hell
* fix inkHUD warnings as well
* last 2 check warnings
* git checks should fail on low defects from now on
This commit is contained in:
Thomas Göttgens
2026-02-16 12:28:07 +01:00
committed by GitHub
parent 32db70037d
commit 56fd9c7813
56 changed files with 217 additions and 226 deletions
+1 -3
View File
@@ -131,9 +131,7 @@ void StoreForwardModule::historySend(uint32_t secAgo, uint32_t to)
uint32_t StoreForwardModule::getNumAvailablePackets(NodeNum dest, uint32_t last_time)
{
uint32_t count = 0;
if (lastRequest.find(dest) == lastRequest.end()) {
lastRequest.emplace(dest, 0);
}
lastRequest.emplace(dest, 0);
for (uint32_t i = lastRequest[dest]; i < this->packetHistoryTotalCount; i++) {
if (this->packetHistory[i].time && (this->packetHistory[i].time > last_time)) {
// Client is only interested in packets not from itself and only in broadcast packets or packets towards it.