General cleanup and refactor.

This commit is contained in:
2022-03-07 07:36:32 +00:00
parent 27900ec144
commit 8d40f3e395
60 changed files with 1034 additions and 1156 deletions

View File

@@ -36,12 +36,12 @@
// Copyright © 2011-2022 Natalia Portillo
// ****************************************************************************/
namespace Aaru.CommonTypes.Extents;
using System;
using System.Collections.Generic;
using System.Linq;
namespace Aaru.CommonTypes.Extents;
/// <summary>Implements extents for <see cref="ulong" /></summary>
public class ExtentsULong
{
@@ -72,7 +72,7 @@ public class ExtentsULong
Tuple<ulong, ulong> removeTwo = null;
Tuple<ulong, ulong> itemToAdd = null;
for(int i = 0; i < _backend.Count; i++)
for(var i = 0; i < _backend.Count; i++)
{
// Already contained in an extent
if(item >= _backend[i].Item1 &&
@@ -241,8 +241,7 @@ public class ExtentsULong
{
start = 0;
foreach(Tuple<ulong, ulong> extent in
_backend.Where(extent => item >= extent.Item1 && item <= extent.Item2))
foreach(Tuple<ulong, ulong> extent in _backend.Where(extent => item >= extent.Item1 && item <= extent.Item2))
{
start = extent.Item1;