mirror of
https://github.com/meshtastic/firmware.git
synced 2025-08-22 13:08:06 +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 */
|
* @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)
|
bool PacketHistory::wasRelayer(const uint8_t relayer, const uint32_t id, const NodeNum sender)
|
||||||
{
|
{
|
||||||
PacketRecord r;
|
PacketRecord r = {.sender = sender, .id = id, .rxTimeMsec = 0, .next_hop = 0};
|
||||||
r.id = id;
|
|
||||||
r.sender = sender;
|
|
||||||
r.rxTimeMsec = 0;
|
|
||||||
r.next_hop = 0;
|
|
||||||
auto found = recentPackets.find(r);
|
auto found = recentPackets.find(r);
|
||||||
|
|
||||||
if (found == recentPackets.end()) {
|
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
|
// 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)
|
void PacketHistory::removeRelayer(const uint8_t relayer, const uint32_t id, const NodeNum sender)
|
||||||
{
|
{
|
||||||
PacketRecord r;
|
PacketRecord r = {.sender = sender, .id = id, .rxTimeMsec = 0, .next_hop = 0};
|
||||||
r.id = id;
|
|
||||||
r.sender = sender;
|
|
||||||
auto found = recentPackets.find(r);
|
auto found = recentPackets.find(r);
|
||||||
|
|
||||||
if (found == recentPackets.end()) {
|
if (found == recentPackets.end()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user