mirror of
https://github.com/meshtastic/firmware.git
synced 2025-06-25 22:20:27 +00:00
Fix another cppcheck error
This commit is contained in:
parent
71a90b3b78
commit
93bcee3aab
@ -109,11 +109,7 @@ void PacketHistory::clearExpiredRecentPackets()
|
||||
* @return true if node was indeed a relayer, false if not */
|
||||
bool PacketHistory::wasRelayer(const uint8_t relayer, const uint32_t id, const NodeNum sender)
|
||||
{
|
||||
PacketRecord r;
|
||||
r.id = id;
|
||||
r.sender = sender;
|
||||
r.rxTimeMsec = 0;
|
||||
r.next_hop = 0;
|
||||
PacketRecord r = {.sender = sender, .id = id, .rxTimeMsec = 0, .next_hop = 0};
|
||||
auto found = recentPackets.find(r);
|
||||
|
||||
if (found == recentPackets.end()) {
|
||||
@ -138,9 +134,7 @@ bool PacketHistory::wasRelayer(const uint8_t relayer, std::unordered_set<PacketR
|
||||
// Remove a relayer from the list of relayers of a packet in the history given an ID and sender
|
||||
void PacketHistory::removeRelayer(const uint8_t relayer, const uint32_t id, const NodeNum sender)
|
||||
{
|
||||
PacketRecord r;
|
||||
r.id = id;
|
||||
r.sender = sender;
|
||||
PacketRecord r = {.sender = sender, .id = id, .rxTimeMsec = 0, .next_hop = 0};
|
||||
auto found = recentPackets.find(r);
|
||||
|
||||
if (found == recentPackets.end()) {
|
||||
|
Loading…
Reference in New Issue
Block a user