Skip to content

Commit

Permalink
Updated preprocessor directives
Browse files Browse the repository at this point in the history
  • Loading branch information
Uralstech committed Nov 7, 2023
1 parent df310e1 commit 4071c1f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
2 changes: 0 additions & 2 deletions LLama/Common/FixedSizeQueue.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@ public FixedSizeQueue(int size, IEnumerable<T> data)
// in which case we'll have to check later
if (data.TryGetNonEnumeratedCount(out var dataCount) && dataCount > size)
throw new ArgumentException($"The max size set for the quene is {size}, but got {dataCount} initial values.");
#elif !NETSTANDARD2_0_OR_GREATER
#error Target framework not supported!
#endif

// Size of "data" is unknown, copy it all into a list
Expand Down
4 changes: 1 addition & 3 deletions LLama/Extensions/ListExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,12 @@ namespace LLama.Extensions
{
internal static class ListExtensions
{
#if NETSTANDARD2_0 || NETSTANDARD2_1
#if !NET6_0_OR_GREATER
public static void EnsureCapacity<T>(this List<T> list, int capacity)
{
if (list.Capacity < capacity)
list.Capacity = capacity;
}
#elif !NET6_0_OR_GREATER
#error Target framework not supported!
#endif

public static void AddSpan<T>(this List<T> list, ReadOnlySpan<T> items)
Expand Down

0 comments on commit 4071c1f

Please sign in to comment.