Skip to content

Type choice enhancements#7

Open
dpellegr wants to merge 1 commit into
jrullan:masterfrom
dpellegr:master
Open

Type choice enhancements#7
dpellegr wants to merge 1 commit into
jrullan:masterfrom
dpellegr:master

Conversation

@dpellegr
Copy link
Copy Markdown

All signed ints has been converted to unsigned long.
This is logically appropriate as timers and counters should never go negative.
In addition it also suppresses some compiler warning (-Wsign-compare).

I suspect that the original choice was motivated by the special values NEOTIMER_INDEFINITE and NEOTIMER_UNLIMITED. These have been adjusted to the maximum allowable value for the unsigned long type by replacing the #define statement with constexpr.

All signed ints has been converted to unsigned long.
This is logically appropriate as timers and counters should never go negative.
In addition it also suppresses some compiler warning (-Wsign-compare).

I suspect that the original choice was motivated by the special values NEOTIMER_INDEFINITE and NEOTIMER_UNLIMITED. These have been adjusted to the maximum allowable value for the unsigned long type by replacing the #define statement with constexpr.
@dbartelmus
Copy link
Copy Markdown

This is correct, I suggest using this file.

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.

2 participants