Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor fix #4666

Merged
merged 2 commits into from
Sep 23, 2024
Merged

Minor fix #4666

merged 2 commits into from
Sep 23, 2024

Conversation

fifieldt
Copy link
Contributor

@fifieldt fifieldt commented Sep 9, 2024

It turns out setting a map value with the index notation causes an lookup that can be avoided with emplace. Apply this to one line in the StoreForward module.

@caveman99
Copy link
Member

the Portduino change needs to be refactored methinks.

@fifieldt fifieldt changed the title Minor fixes Minor fixe Sep 22, 2024
@fifieldt fifieldt changed the title Minor fixe Minor fix Sep 22, 2024
It turns out setting a map value with the index notation causes
an lookup that can be avoided with emplace. Apply this to one line in
the StoreForward module.

Fix also Cppcheck-determined highly minor performance increase by
passing gpiochipname as a const reference :)

The amount of cycles used on this laptop while learning about these
callouts from cppcheck is unlikely to ever be more than the cycles
saved by the fixes ;)
@fifieldt fifieldt merged commit 1f8aa1e into meshtastic:master Sep 23, 2024
107 checks passed
mverch67 pushed a commit that referenced this pull request Sep 23, 2024
* Minor fixes

It turns out setting a map value with the index notation causes
an lookup that can be avoided with emplace. Apply this to one line in
the StoreForward module.

Fix also Cppcheck-determined highly minor performance increase by
passing gpiochipname as a const reference :)

The amount of cycles used on this laptop while learning about these
callouts from cppcheck is unlikely to ever be more than the cycles
saved by the fixes ;)

* Update PortduinoGlue.cpp
@fifieldt fifieldt deleted the minor-fixes branch October 24, 2024 04:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants