Skip to content

Commit

Permalink
Moved: ItemFit back inside CircularBufferStruct to avoid any potentia…
Browse files Browse the repository at this point in the history
…l conflicts in future.
  • Loading branch information
Sewer56 committed Feb 21, 2024
1 parent 994dec5 commit a95ac6c
Show file tree
Hide file tree
Showing 9 changed files with 66 additions and 34 deletions.
8 changes: 6 additions & 2 deletions src/Reloaded.Memory/PublicAPI/net48/PublicAPI.Unshipped.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,16 @@ Reloaded.Memory.Utilities.CircularBufferStruct.Add(byte* data, uint length) -> n
Reloaded.Memory.Utilities.CircularBufferStruct.Add<T>(T value) -> nuint
Reloaded.Memory.Utilities.CircularBufferStruct.Add<TSource, T>(TSource source, T value) -> nuint
Reloaded.Memory.Utilities.CircularBufferStruct.Add<TSource>(TSource source, byte* data, uint length) -> nuint
Reloaded.Memory.Utilities.CircularBufferStruct.CanItemFit(uint itemSize) -> Reloaded.Memory.Utilities.ItemFit
Reloaded.Memory.Utilities.CircularBufferStruct.CanItemFit<T>() -> Reloaded.Memory.Utilities.ItemFit
Reloaded.Memory.Utilities.CircularBufferStruct.CanItemFit(uint itemSize) -> Reloaded.Memory.Utilities.CircularBufferStruct.ItemFit
Reloaded.Memory.Utilities.CircularBufferStruct.CanItemFit<T>() -> Reloaded.Memory.Utilities.CircularBufferStruct.ItemFit
Reloaded.Memory.Utilities.CircularBufferStruct.CircularBufferStruct() -> void
Reloaded.Memory.Utilities.CircularBufferStruct.CircularBufferStruct(nuint start, int size) -> void
Reloaded.Memory.Utilities.CircularBufferStruct.Current.get -> nuint
Reloaded.Memory.Utilities.CircularBufferStruct.End.get -> nuint
Reloaded.Memory.Utilities.CircularBufferStruct.ItemFit
Reloaded.Memory.Utilities.CircularBufferStruct.ItemFit.No = 2 -> Reloaded.Memory.Utilities.CircularBufferStruct.ItemFit
Reloaded.Memory.Utilities.CircularBufferStruct.ItemFit.StartOfBuffer = 1 -> Reloaded.Memory.Utilities.CircularBufferStruct.ItemFit
Reloaded.Memory.Utilities.CircularBufferStruct.ItemFit.Yes = 0 -> Reloaded.Memory.Utilities.CircularBufferStruct.ItemFit
Reloaded.Memory.Utilities.CircularBufferStruct.Remaining.get -> nuint
Reloaded.Memory.Utilities.CircularBufferStruct.Size.get -> nuint
Reloaded.Memory.Utilities.CircularBufferStruct.Start.get -> nuint
Expand Down
8 changes: 6 additions & 2 deletions src/Reloaded.Memory/PublicAPI/net5.0/PublicAPI.Unshipped.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,16 @@ Reloaded.Memory.Utilities.CircularBufferStruct.Add(byte* data, uint length) -> n
Reloaded.Memory.Utilities.CircularBufferStruct.Add<T>(T value) -> nuint
Reloaded.Memory.Utilities.CircularBufferStruct.Add<TSource, T>(TSource source, T value) -> nuint
Reloaded.Memory.Utilities.CircularBufferStruct.Add<TSource>(TSource source, byte* data, uint length) -> nuint
Reloaded.Memory.Utilities.CircularBufferStruct.CanItemFit(uint itemSize) -> Reloaded.Memory.Utilities.ItemFit
Reloaded.Memory.Utilities.CircularBufferStruct.CanItemFit<T>() -> Reloaded.Memory.Utilities.ItemFit
Reloaded.Memory.Utilities.CircularBufferStruct.CanItemFit(uint itemSize) -> Reloaded.Memory.Utilities.CircularBufferStruct.ItemFit
Reloaded.Memory.Utilities.CircularBufferStruct.CanItemFit<T>() -> Reloaded.Memory.Utilities.CircularBufferStruct.ItemFit
Reloaded.Memory.Utilities.CircularBufferStruct.CircularBufferStruct() -> void
Reloaded.Memory.Utilities.CircularBufferStruct.CircularBufferStruct(nuint start, int size) -> void
Reloaded.Memory.Utilities.CircularBufferStruct.Current.get -> nuint
Reloaded.Memory.Utilities.CircularBufferStruct.End.get -> nuint
Reloaded.Memory.Utilities.CircularBufferStruct.ItemFit
Reloaded.Memory.Utilities.CircularBufferStruct.ItemFit.No = 2 -> Reloaded.Memory.Utilities.CircularBufferStruct.ItemFit
Reloaded.Memory.Utilities.CircularBufferStruct.ItemFit.StartOfBuffer = 1 -> Reloaded.Memory.Utilities.CircularBufferStruct.ItemFit
Reloaded.Memory.Utilities.CircularBufferStruct.ItemFit.Yes = 0 -> Reloaded.Memory.Utilities.CircularBufferStruct.ItemFit
Reloaded.Memory.Utilities.CircularBufferStruct.Remaining.get -> nuint
Reloaded.Memory.Utilities.CircularBufferStruct.Size.get -> nuint
Reloaded.Memory.Utilities.CircularBufferStruct.Start.get -> nuint
Expand Down
8 changes: 6 additions & 2 deletions src/Reloaded.Memory/PublicAPI/net6.0/PublicAPI.Unshipped.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,16 @@ Reloaded.Memory.Utilities.CircularBufferStruct.Add(byte* data, uint length) -> n
Reloaded.Memory.Utilities.CircularBufferStruct.Add<T>(T value) -> nuint
Reloaded.Memory.Utilities.CircularBufferStruct.Add<TSource, T>(TSource source, T value) -> nuint
Reloaded.Memory.Utilities.CircularBufferStruct.Add<TSource>(TSource source, byte* data, uint length) -> nuint
Reloaded.Memory.Utilities.CircularBufferStruct.CanItemFit(uint itemSize) -> Reloaded.Memory.Utilities.ItemFit
Reloaded.Memory.Utilities.CircularBufferStruct.CanItemFit<T>() -> Reloaded.Memory.Utilities.ItemFit
Reloaded.Memory.Utilities.CircularBufferStruct.CanItemFit(uint itemSize) -> Reloaded.Memory.Utilities.CircularBufferStruct.ItemFit
Reloaded.Memory.Utilities.CircularBufferStruct.CanItemFit<T>() -> Reloaded.Memory.Utilities.CircularBufferStruct.ItemFit
Reloaded.Memory.Utilities.CircularBufferStruct.CircularBufferStruct() -> void
Reloaded.Memory.Utilities.CircularBufferStruct.CircularBufferStruct(nuint start, int size) -> void
Reloaded.Memory.Utilities.CircularBufferStruct.Current.get -> nuint
Reloaded.Memory.Utilities.CircularBufferStruct.End.get -> nuint
Reloaded.Memory.Utilities.CircularBufferStruct.ItemFit
Reloaded.Memory.Utilities.CircularBufferStruct.ItemFit.No = 2 -> Reloaded.Memory.Utilities.CircularBufferStruct.ItemFit
Reloaded.Memory.Utilities.CircularBufferStruct.ItemFit.StartOfBuffer = 1 -> Reloaded.Memory.Utilities.CircularBufferStruct.ItemFit
Reloaded.Memory.Utilities.CircularBufferStruct.ItemFit.Yes = 0 -> Reloaded.Memory.Utilities.CircularBufferStruct.ItemFit
Reloaded.Memory.Utilities.CircularBufferStruct.Remaining.get -> nuint
Reloaded.Memory.Utilities.CircularBufferStruct.Size.get -> nuint
Reloaded.Memory.Utilities.CircularBufferStruct.Start.get -> nuint
Expand Down
8 changes: 6 additions & 2 deletions src/Reloaded.Memory/PublicAPI/net7.0/PublicAPI.Unshipped.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,16 @@ Reloaded.Memory.Utilities.CircularBufferStruct.Add(byte* data, uint length) -> n
Reloaded.Memory.Utilities.CircularBufferStruct.Add<T>(T value) -> nuint
Reloaded.Memory.Utilities.CircularBufferStruct.Add<TSource, T>(TSource source, T value) -> nuint
Reloaded.Memory.Utilities.CircularBufferStruct.Add<TSource>(TSource source, byte* data, uint length) -> nuint
Reloaded.Memory.Utilities.CircularBufferStruct.CanItemFit(uint itemSize) -> Reloaded.Memory.Utilities.ItemFit
Reloaded.Memory.Utilities.CircularBufferStruct.CanItemFit<T>() -> Reloaded.Memory.Utilities.ItemFit
Reloaded.Memory.Utilities.CircularBufferStruct.CanItemFit(uint itemSize) -> Reloaded.Memory.Utilities.CircularBufferStruct.ItemFit
Reloaded.Memory.Utilities.CircularBufferStruct.CanItemFit<T>() -> Reloaded.Memory.Utilities.CircularBufferStruct.ItemFit
Reloaded.Memory.Utilities.CircularBufferStruct.CircularBufferStruct() -> void
Reloaded.Memory.Utilities.CircularBufferStruct.CircularBufferStruct(nuint start, int size) -> void
Reloaded.Memory.Utilities.CircularBufferStruct.Current.get -> nuint
Reloaded.Memory.Utilities.CircularBufferStruct.End.get -> nuint
Reloaded.Memory.Utilities.CircularBufferStruct.ItemFit
Reloaded.Memory.Utilities.CircularBufferStruct.ItemFit.No = 2 -> Reloaded.Memory.Utilities.CircularBufferStruct.ItemFit
Reloaded.Memory.Utilities.CircularBufferStruct.ItemFit.StartOfBuffer = 1 -> Reloaded.Memory.Utilities.CircularBufferStruct.ItemFit
Reloaded.Memory.Utilities.CircularBufferStruct.ItemFit.Yes = 0 -> Reloaded.Memory.Utilities.CircularBufferStruct.ItemFit
Reloaded.Memory.Utilities.CircularBufferStruct.Remaining.get -> nuint
Reloaded.Memory.Utilities.CircularBufferStruct.Size.get -> nuint
Reloaded.Memory.Utilities.CircularBufferStruct.Start.get -> nuint
Expand Down
8 changes: 6 additions & 2 deletions src/Reloaded.Memory/PublicAPI/net8.0/PublicAPI.Unshipped.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,16 @@ Reloaded.Memory.Utilities.CircularBufferStruct.Add(byte* data, uint length) -> n
Reloaded.Memory.Utilities.CircularBufferStruct.Add<T>(T value) -> nuint
Reloaded.Memory.Utilities.CircularBufferStruct.Add<TSource, T>(TSource source, T value) -> nuint
Reloaded.Memory.Utilities.CircularBufferStruct.Add<TSource>(TSource source, byte* data, uint length) -> nuint
Reloaded.Memory.Utilities.CircularBufferStruct.CanItemFit(uint itemSize) -> Reloaded.Memory.Utilities.ItemFit
Reloaded.Memory.Utilities.CircularBufferStruct.CanItemFit<T>() -> Reloaded.Memory.Utilities.ItemFit
Reloaded.Memory.Utilities.CircularBufferStruct.CanItemFit(uint itemSize) -> Reloaded.Memory.Utilities.CircularBufferStruct.ItemFit
Reloaded.Memory.Utilities.CircularBufferStruct.CanItemFit<T>() -> Reloaded.Memory.Utilities.CircularBufferStruct.ItemFit
Reloaded.Memory.Utilities.CircularBufferStruct.CircularBufferStruct() -> void
Reloaded.Memory.Utilities.CircularBufferStruct.CircularBufferStruct(nuint start, int size) -> void
Reloaded.Memory.Utilities.CircularBufferStruct.Current.get -> nuint
Reloaded.Memory.Utilities.CircularBufferStruct.End.get -> nuint
Reloaded.Memory.Utilities.CircularBufferStruct.ItemFit
Reloaded.Memory.Utilities.CircularBufferStruct.ItemFit.No = 2 -> Reloaded.Memory.Utilities.CircularBufferStruct.ItemFit
Reloaded.Memory.Utilities.CircularBufferStruct.ItemFit.StartOfBuffer = 1 -> Reloaded.Memory.Utilities.CircularBufferStruct.ItemFit
Reloaded.Memory.Utilities.CircularBufferStruct.ItemFit.Yes = 0 -> Reloaded.Memory.Utilities.CircularBufferStruct.ItemFit
Reloaded.Memory.Utilities.CircularBufferStruct.Remaining.get -> nuint
Reloaded.Memory.Utilities.CircularBufferStruct.Size.get -> nuint
Reloaded.Memory.Utilities.CircularBufferStruct.Start.get -> nuint
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,16 @@ Reloaded.Memory.Utilities.CircularBufferStruct.Add(byte* data, uint length) -> n
Reloaded.Memory.Utilities.CircularBufferStruct.Add<T>(T value) -> nuint
Reloaded.Memory.Utilities.CircularBufferStruct.Add<TSource, T>(TSource source, T value) -> nuint
Reloaded.Memory.Utilities.CircularBufferStruct.Add<TSource>(TSource source, byte* data, uint length) -> nuint
Reloaded.Memory.Utilities.CircularBufferStruct.CanItemFit(uint itemSize) -> Reloaded.Memory.Utilities.ItemFit
Reloaded.Memory.Utilities.CircularBufferStruct.CanItemFit<T>() -> Reloaded.Memory.Utilities.ItemFit
Reloaded.Memory.Utilities.CircularBufferStruct.CanItemFit(uint itemSize) -> Reloaded.Memory.Utilities.CircularBufferStruct.ItemFit
Reloaded.Memory.Utilities.CircularBufferStruct.CanItemFit<T>() -> Reloaded.Memory.Utilities.CircularBufferStruct.ItemFit
Reloaded.Memory.Utilities.CircularBufferStruct.CircularBufferStruct() -> void
Reloaded.Memory.Utilities.CircularBufferStruct.CircularBufferStruct(nuint start, int size) -> void
Reloaded.Memory.Utilities.CircularBufferStruct.Current.get -> nuint
Reloaded.Memory.Utilities.CircularBufferStruct.End.get -> nuint
Reloaded.Memory.Utilities.CircularBufferStruct.ItemFit
Reloaded.Memory.Utilities.CircularBufferStruct.ItemFit.No = 2 -> Reloaded.Memory.Utilities.CircularBufferStruct.ItemFit
Reloaded.Memory.Utilities.CircularBufferStruct.ItemFit.StartOfBuffer = 1 -> Reloaded.Memory.Utilities.CircularBufferStruct.ItemFit
Reloaded.Memory.Utilities.CircularBufferStruct.ItemFit.Yes = 0 -> Reloaded.Memory.Utilities.CircularBufferStruct.ItemFit
Reloaded.Memory.Utilities.CircularBufferStruct.Remaining.get -> nuint
Reloaded.Memory.Utilities.CircularBufferStruct.Size.get -> nuint
Reloaded.Memory.Utilities.CircularBufferStruct.Start.get -> nuint
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,16 @@ Reloaded.Memory.Utilities.CircularBufferStruct.Add(byte* data, uint length) -> n
Reloaded.Memory.Utilities.CircularBufferStruct.Add<T>(T value) -> nuint
Reloaded.Memory.Utilities.CircularBufferStruct.Add<TSource, T>(TSource source, T value) -> nuint
Reloaded.Memory.Utilities.CircularBufferStruct.Add<TSource>(TSource source, byte* data, uint length) -> nuint
Reloaded.Memory.Utilities.CircularBufferStruct.CanItemFit(uint itemSize) -> Reloaded.Memory.Utilities.ItemFit
Reloaded.Memory.Utilities.CircularBufferStruct.CanItemFit<T>() -> Reloaded.Memory.Utilities.ItemFit
Reloaded.Memory.Utilities.CircularBufferStruct.CanItemFit(uint itemSize) -> Reloaded.Memory.Utilities.CircularBufferStruct.ItemFit
Reloaded.Memory.Utilities.CircularBufferStruct.CanItemFit<T>() -> Reloaded.Memory.Utilities.CircularBufferStruct.ItemFit
Reloaded.Memory.Utilities.CircularBufferStruct.CircularBufferStruct() -> void
Reloaded.Memory.Utilities.CircularBufferStruct.CircularBufferStruct(nuint start, int size) -> void
Reloaded.Memory.Utilities.CircularBufferStruct.Current.get -> nuint
Reloaded.Memory.Utilities.CircularBufferStruct.End.get -> nuint
Reloaded.Memory.Utilities.CircularBufferStruct.ItemFit
Reloaded.Memory.Utilities.CircularBufferStruct.ItemFit.No = 2 -> Reloaded.Memory.Utilities.CircularBufferStruct.ItemFit
Reloaded.Memory.Utilities.CircularBufferStruct.ItemFit.StartOfBuffer = 1 -> Reloaded.Memory.Utilities.CircularBufferStruct.ItemFit
Reloaded.Memory.Utilities.CircularBufferStruct.ItemFit.Yes = 0 -> Reloaded.Memory.Utilities.CircularBufferStruct.ItemFit
Reloaded.Memory.Utilities.CircularBufferStruct.Remaining.get -> nuint
Reloaded.Memory.Utilities.CircularBufferStruct.Size.get -> nuint
Reloaded.Memory.Utilities.CircularBufferStruct.Start.get -> nuint
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,16 @@ Reloaded.Memory.Utilities.CircularBufferStruct.Add(byte* data, uint length) -> n
Reloaded.Memory.Utilities.CircularBufferStruct.Add<T>(T value) -> nuint
Reloaded.Memory.Utilities.CircularBufferStruct.Add<TSource, T>(TSource source, T value) -> nuint
Reloaded.Memory.Utilities.CircularBufferStruct.Add<TSource>(TSource source, byte* data, uint length) -> nuint
Reloaded.Memory.Utilities.CircularBufferStruct.CanItemFit(uint itemSize) -> Reloaded.Memory.Utilities.ItemFit
Reloaded.Memory.Utilities.CircularBufferStruct.CanItemFit<T>() -> Reloaded.Memory.Utilities.ItemFit
Reloaded.Memory.Utilities.CircularBufferStruct.CanItemFit(uint itemSize) -> Reloaded.Memory.Utilities.CircularBufferStruct.ItemFit
Reloaded.Memory.Utilities.CircularBufferStruct.CanItemFit<T>() -> Reloaded.Memory.Utilities.CircularBufferStruct.ItemFit
Reloaded.Memory.Utilities.CircularBufferStruct.CircularBufferStruct() -> void
Reloaded.Memory.Utilities.CircularBufferStruct.CircularBufferStruct(nuint start, int size) -> void
Reloaded.Memory.Utilities.CircularBufferStruct.Current.get -> nuint
Reloaded.Memory.Utilities.CircularBufferStruct.End.get -> nuint
Reloaded.Memory.Utilities.CircularBufferStruct.ItemFit
Reloaded.Memory.Utilities.CircularBufferStruct.ItemFit.No = 2 -> Reloaded.Memory.Utilities.CircularBufferStruct.ItemFit
Reloaded.Memory.Utilities.CircularBufferStruct.ItemFit.StartOfBuffer = 1 -> Reloaded.Memory.Utilities.CircularBufferStruct.ItemFit
Reloaded.Memory.Utilities.CircularBufferStruct.ItemFit.Yes = 0 -> Reloaded.Memory.Utilities.CircularBufferStruct.ItemFit
Reloaded.Memory.Utilities.CircularBufferStruct.Remaining.get -> nuint
Reloaded.Memory.Utilities.CircularBufferStruct.Size.get -> nuint
Reloaded.Memory.Utilities.CircularBufferStruct.Start.get -> nuint
Expand Down
36 changes: 18 additions & 18 deletions src/Reloaded.Memory/Utilities/CircularBufferStruct.cs
Original file line number Diff line number Diff line change
Expand Up @@ -233,25 +233,25 @@ public ItemFit CanItemFit<T>() where T : unmanaged

return ItemFit.No;
}
}

/// <summary>
/// Possible results for whether the item can fit.
/// </summary>
public enum ItemFit
{
/// <summary>
/// The item can fit into the buffer.
/// </summary>
Yes,

/// <summary>
/// The item can fit into the buffer, but not in the remaining space (will be placed at start of buffer).
/// </summary>
StartOfBuffer,

/// <summary>
/// The item is too large to fit into the buffer.
/// Possible results for whether the item can fit.
/// </summary>
No
public enum ItemFit
{
/// <summary>
/// The item can fit into the buffer.
/// </summary>
Yes,

/// <summary>
/// The item can fit into the buffer, but not in the remaining space (will be placed at start of buffer).
/// </summary>
StartOfBuffer,

/// <summary>
/// The item is too large to fit into the buffer.
/// </summary>
No
}
}

0 comments on commit a95ac6c

Please sign in to comment.