Skip to content

Commit

Permalink
Optimised linq
Browse files Browse the repository at this point in the history
  • Loading branch information
credfeto committed Nov 15, 2024
1 parent a2c5e92 commit 17e9830
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/Credfeto.ChangeLog/ChangeLogUpdater.cs
Original file line number Diff line number Diff line change
Expand Up @@ -125,12 +125,7 @@ private static int FindRemovePosition(List<string> changeLog, string type, strin
findSection: false);
}

private static int FindMatchPosition(List<string> changeLog,
string type,
Func<string, bool> isMatch,
Func<int, int> exactMatchAction,
Func<int, int> emptySectionAction,
bool findSection)
private static int FindMatchPosition(List<string> changeLog, string type, Func<string, bool> isMatch, Func<int, int> exactMatchAction, Func<int, int> emptySectionAction, bool findSection)
{
bool foundUnreleased = false;

Expand Down Expand Up @@ -277,7 +272,7 @@ private static void PrependReleaseVersionHeader(List<string> newRelease, string

private static void RemoveItems(List<string> text, List<int> removeIndexes)
{
foreach (int item in removeIndexes.OrderByDescending(x => x))
foreach (int item in removeIndexes.OrderDescending())
{
text.RemoveAt(item);
}
Expand Down

0 comments on commit 17e9830

Please sign in to comment.