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

Not do any precondition range checks when moving the reader / writer … #362

Merged
merged 3 commits into from
Apr 26, 2018

Conversation

normanmaurer
Copy link
Member

…index from within our methods of ByteBuffer.

Motivation:

We should not need to do any precondition range changes when we change the reader / writer index within our ByteBuffer methods as we know the index is valid. Beside this we already have asserts in place.

Modifications:

Add missing _ methods to adjust the reader / writer index and make use of these.

Result:

Less range checks within our ByteBuffer methods.

…index from within our methods of ByteBuffer.

Motivation:

We should not need to do any precondition range changes when we change the reader / writer index within our ByteBuffer methods as we know the index is valid. Beside this we already have asserts in place.

Modifications:

Add missing _ methods to adjust the reader / writer index and make use of these.

Result:

Less range checks within our ByteBuffer methods.
Copy link
Member

@weissi weissi left a comment

Choose a reason for hiding this comment

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

nice!

@tomerd
Copy link
Member

tomerd commented Apr 26, 2018

@swift-nio-bot test this please

Copy link
Contributor

@Lukasa Lukasa left a comment

Choose a reason for hiding this comment

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

Looks good to me, thanks!

@normanmaurer
Copy link
Member Author

Let me merge as @weissi and @Lukasa approved :)

@normanmaurer normanmaurer merged commit 6565ec5 into apple:master Apr 26, 2018
@normanmaurer normanmaurer deleted the buffer_move_index branch April 26, 2018 19:43
@normanmaurer normanmaurer added this to the 1.6.0 milestone Apr 26, 2018
@weissi weissi added the semver/patch No public API change. label Apr 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver/patch No public API change.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants