Skip to content

feat: FastBufferReader/Writer IsInitialized property #1859

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

Merged
merged 4 commits into from
Apr 5, 2022

Conversation

LukeStampfli
Copy link
Contributor

Adds an IsInitialized property to FastBufferWriter/Reader. This property can be used to check whether they are intialized instead of using reader.Equals(default) which incurs boxing to Object.

Changelog

  • Added: FastBufferWriter and Reader IsInitialized property.

Testing and Documentation

  • Includes unit tests.
  • No documentation changes or additions were necessary.

@LukeStampfli LukeStampfli requested a review from ShadauxCat April 4, 2022 09:11
@@ -207,7 +213,7 @@ internal unsafe void Grow(int additionalSizeRequired)
/// When you know you will be writing multiple fields back-to-back and you know the total size,
/// you can call TryBeginWrite() once on the total size, and then follow it with calls to
/// WriteValue() instead of WriteValueSafe() for faster serialization.
///
///
Copy link
Collaborator

Choose a reason for hiding this comment

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

This change is unacceptable to me. The whitespace at the end of this comment line was critical to the blahdy blah blah blah...

(Thanks for cleaning this up.)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Haha I don't think that was me but just Rider auto formatting 😆

@LukeStampfli LukeStampfli enabled auto-merge (squash) April 5, 2022 12:09
@LukeStampfli LukeStampfli merged commit c384053 into develop Apr 5, 2022
@LukeStampfli LukeStampfli deleted the feature/readerwriter-isinitialized branch April 5, 2022 12:33
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