From 824f568ed26509e114e28c8a80bd79cfcaff14e2 Mon Sep 17 00:00:00 2001 From: Jason Nelson Date: Tue, 26 Jun 2018 08:54:53 -0700 Subject: [PATCH] Remove unused ListExtensions class --- .../Common/Extensions/ListExtensions.cs | 46 ------------------- 1 file changed, 46 deletions(-) delete mode 100644 src/ImageSharp/Common/Extensions/ListExtensions.cs diff --git a/src/ImageSharp/Common/Extensions/ListExtensions.cs b/src/ImageSharp/Common/Extensions/ListExtensions.cs deleted file mode 100644 index 2713896c0..000000000 --- a/src/ImageSharp/Common/Extensions/ListExtensions.cs +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Six Labors and contributors. -// Licensed under the Apache License, Version 2.0. - -using System.Collections.Generic; - -namespace SixLabors.ImageSharp.Common.Extensions -{ - /// - /// Encapsulates a series of time saving extension methods to the class. - /// - internal static class ListExtensions - { - /// - /// Inserts an item at the given index automatically expanding the capacity if required. - /// - /// The type of object within the list - /// The list - /// The index - /// The item to insert - public static void SafeInsert(this List list, int index, T item) - { - if (index >= list.Count) - { - list.Add(item); - } - else - { - list[index] = item; - } - } - - /// - /// Removes the last element from a list and returns that element. This method changes the length of the list. - /// - /// The type of object within the list - /// The list - /// The last element in the specified sequence. - public static T Pop(this List list) - { - int last = list.Count - 1; - T item = list[last]; - list.RemoveAt(last); - return item; - } - } -} \ No newline at end of file