Browse Source

Updated preprocessor directives

tags/v0.8.0
Udayshankar Ravikumar 2 years ago
parent
commit
4071c1f5fc
2 changed files with 1 additions and 5 deletions
  1. +0
    -2
      LLama/Common/FixedSizeQueue.cs
  2. +1
    -3
      LLama/Extensions/ListExtensions.cs

+ 0
- 2
LLama/Common/FixedSizeQueue.cs View File

@@ -48,8 +48,6 @@ namespace LLama.Common
// 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


+ 1
- 3
LLama/Extensions/ListExtensions.cs View File

@@ -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)


Loading…
Cancel
Save