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

polishing: No double negations #17

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

polishing: No double negations #17

wants to merge 3 commits into from

Conversation

juleskers
Copy link

Hi Forkineye,

I'm very grateful to your excellent E131 code; I'm reading it to learn how to handle my own E131 on a particle photon.

In doing so, I kept struggling with the double negations around #ifndef NO_DOUBLE_BUFFER.
I've decided to flip it around for less confusion, and wanted to offer it up to you as "upstream", in case you might find it useful.

If you find it useful, please feel free to take it, I put this contribution into the public domain, so that you may use it in whatever way you see fit.

Thank you for the excellent library, I am going to fiddle with it further :-)

Jules added 3 commits January 21, 2018 17:02
This avoids confusing situations where we are doing "ifNdef NO_...".
Debugging is hard enough as it is, without having to do double logic inversions
on the side :-)

This reasoning was inspired by the Rust-lang discussion about the "#[no_std]" feature.
Reduce the amount of conditional code, by extract the part that
is identical in both cases.
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.

1 participant