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

Added getLength() #51

Merged
merged 2 commits into from
Oct 9, 2022
Merged

Added getLength() #51

merged 2 commits into from
Oct 9, 2022

Conversation

matthias-bs
Copy link
Contributor

I downloaded the fork and ran the tests. It seems I did not break anything. ;-)

_buffer += 8;
_intToBytes(_buffer + _offset, lat, 4);
_intToBytes(_buffer + _offset + 4, lng, 4);
_offset += 8;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am wondering if it would be more logical to split this up in two += 4 parts?

Or if it would even make sense to express all of these as:
_buffer + (_offset += ...) where the advancement is inlined.

What do you think?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, following your first proposal should improve readability.

@joscha joscha merged commit 6ca268e into thesolarnomad:master Oct 9, 2022
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.

None yet

2 participants