From 17e983067def78dab0a57ff1d079a67ce7cde9ac Mon Sep 17 00:00:00 2001 From: Mark Ridgwell Date: Fri, 15 Nov 2024 16:45:12 +0000 Subject: [PATCH] Optimised linq --- src/Credfeto.ChangeLog/ChangeLogUpdater.cs | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/Credfeto.ChangeLog/ChangeLogUpdater.cs b/src/Credfeto.ChangeLog/ChangeLogUpdater.cs index b616bd12..31885303 100644 --- a/src/Credfeto.ChangeLog/ChangeLogUpdater.cs +++ b/src/Credfeto.ChangeLog/ChangeLogUpdater.cs @@ -125,12 +125,7 @@ private static int FindRemovePosition(List changeLog, string type, strin findSection: false); } - private static int FindMatchPosition(List changeLog, - string type, - Func isMatch, - Func exactMatchAction, - Func emptySectionAction, - bool findSection) + private static int FindMatchPosition(List changeLog, string type, Func isMatch, Func exactMatchAction, Func emptySectionAction, bool findSection) { bool foundUnreleased = false; @@ -277,7 +272,7 @@ private static void PrependReleaseVersionHeader(List newRelease, string private static void RemoveItems(List text, List removeIndexes) { - foreach (int item in removeIndexes.OrderByDescending(x => x)) + foreach (int item in removeIndexes.OrderDescending()) { text.RemoveAt(item); }