From 4071c1f5fcf2976246469100e756cd4a5a76e016 Mon Sep 17 00:00:00 2001 From: Udayshankar Ravikumar Date: Tue, 7 Nov 2023 14:05:00 +0530 Subject: [PATCH] Updated preprocessor directives --- LLama/Common/FixedSizeQueue.cs | 2 -- LLama/Extensions/ListExtensions.cs | 4 +--- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/LLama/Common/FixedSizeQueue.cs b/LLama/Common/FixedSizeQueue.cs index 4b665969e..37fb1cf51 100644 --- a/LLama/Common/FixedSizeQueue.cs +++ b/LLama/Common/FixedSizeQueue.cs @@ -48,8 +48,6 @@ public FixedSizeQueue(int size, IEnumerable 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 diff --git a/LLama/Extensions/ListExtensions.cs b/LLama/Extensions/ListExtensions.cs index 003797dc1..eb30a07a0 100644 --- a/LLama/Extensions/ListExtensions.cs +++ b/LLama/Extensions/ListExtensions.cs @@ -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(this List 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(this List list, ReadOnlySpan items)