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

AK: Make some tweaks to AK::Span. #3166

Merged
merged 7 commits into from
Aug 15, 2020
Merged

AK: Make some tweaks to AK::Span. #3166

merged 7 commits into from
Aug 15, 2020

Commits on Aug 15, 2020

  1. AK: Remove incorrect static assert in Span.h.

    This assertion was added to prevent accitentally using stuff like
    Span<int*> instead of Span<int>. But there can be spans of pointers.
    asynts committed Aug 15, 2020
    Configuration menu
    Copy the full SHA
    2b2af2f View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    6a2d81b View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    4d3a8fa View commit details
    Browse the repository at this point in the history
  4. AK: Add fill() method to Span.

    asynts committed Aug 15, 2020
    Configuration menu
    Copy the full SHA
    901cb5b View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    b0ff3d6 View commit details
    Browse the repository at this point in the history
  6. AK: Rename span() to bytes() when appropriate.

    I originally defined the bytes() method for the String class, because it
    made it obvious that it's a span of bytes instead of span of characters.
    
    This commit makes this more consistent by defining a bytes() method when
    the type of the span is known to be u8.
    
    Additionaly, the cast operator to Bytes is overloaded for ByteBuffer and
    such.
    asynts committed Aug 15, 2020
    Configuration menu
    Copy the full SHA
    a706d24 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    1289d51 View commit details
    Browse the repository at this point in the history