mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
General code cleanup and style refactor.
This commit is contained in:
@@ -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="byte" /></summary>
|
||||
public class ExtentsByte
|
||||
{
|
||||
@@ -72,7 +72,7 @@ public class ExtentsByte
|
||||
Tuple<byte, byte> removeTwo = null;
|
||||
Tuple<byte, byte> itemToAdd = null;
|
||||
|
||||
for(var i = 0; i < _backend.Count; i++)
|
||||
for(int i = 0; i < _backend.Count; i++)
|
||||
{
|
||||
// Already contained in an extent
|
||||
if(item >= _backend[i].Item1 &&
|
||||
|
||||
@@ -36,12 +36,13 @@
|
||||
// Copyright © 2011-2022 Natalia Portillo
|
||||
// ****************************************************************************/
|
||||
|
||||
namespace Aaru.CommonTypes.Extents;
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Schemas;
|
||||
|
||||
namespace Aaru.CommonTypes.Extents;
|
||||
|
||||
/// <summary>Converts extents</summary>
|
||||
public static class ExtentsConverter
|
||||
{
|
||||
@@ -54,7 +55,7 @@ public static class ExtentsConverter
|
||||
return null;
|
||||
|
||||
Tuple<ulong, ulong>[] tuples = extents.ToArray();
|
||||
var array = new ExtentType[tuples.Length];
|
||||
ExtentType[] array = new ExtentType[tuples.Length];
|
||||
|
||||
for(ulong i = 0; i < (ulong)array.LongLength; i++)
|
||||
array[i] = new ExtentType
|
||||
@@ -74,7 +75,8 @@ public static class ExtentsConverter
|
||||
if(extents == null)
|
||||
return null;
|
||||
|
||||
var tuples = extents.Select(extent => new Tuple<ulong, ulong>(extent.Start, extent.End)).ToList();
|
||||
List<Tuple<ulong, ulong>> tuples = extents.Select(extent => new Tuple<ulong, ulong>(extent.Start, extent.End)).
|
||||
ToList();
|
||||
|
||||
return new ExtentsULong(tuples);
|
||||
}
|
||||
|
||||
@@ -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="int" /></summary>
|
||||
public class ExtentsInt
|
||||
{
|
||||
@@ -72,7 +72,7 @@ public class ExtentsInt
|
||||
Tuple<int, int> removeTwo = null;
|
||||
Tuple<int, int> itemToAdd = null;
|
||||
|
||||
for(var i = 0; i < _backend.Count; i++)
|
||||
for(int i = 0; i < _backend.Count; i++)
|
||||
{
|
||||
// Already contained in an extent
|
||||
if(item >= _backend[i].Item1 &&
|
||||
|
||||
@@ -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="long" /></summary>
|
||||
public class ExtentsLong
|
||||
{
|
||||
@@ -72,7 +72,7 @@ public class ExtentsLong
|
||||
Tuple<long, long> removeTwo = null;
|
||||
Tuple<long, long> itemToAdd = null;
|
||||
|
||||
for(var i = 0; i < _backend.Count; i++)
|
||||
for(int i = 0; i < _backend.Count; i++)
|
||||
{
|
||||
// Already contained in an extent
|
||||
if(item >= _backend[i].Item1 &&
|
||||
|
||||
@@ -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="sbyte" /></summary>
|
||||
public class ExtentsSByte
|
||||
{
|
||||
@@ -72,7 +72,7 @@ public class ExtentsSByte
|
||||
Tuple<sbyte, sbyte> removeTwo = null;
|
||||
Tuple<sbyte, sbyte> itemToAdd = null;
|
||||
|
||||
for(var i = 0; i < _backend.Count; i++)
|
||||
for(int i = 0; i < _backend.Count; i++)
|
||||
{
|
||||
// Already contained in an extent
|
||||
if(item >= _backend[i].Item1 &&
|
||||
|
||||
@@ -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="short" /></summary>
|
||||
public class ExtentsShort
|
||||
{
|
||||
@@ -72,7 +72,7 @@ public class ExtentsShort
|
||||
Tuple<short, short> removeTwo = null;
|
||||
Tuple<short, short> itemToAdd = null;
|
||||
|
||||
for(var i = 0; i < _backend.Count; i++)
|
||||
for(int i = 0; i < _backend.Count; i++)
|
||||
{
|
||||
// Already contained in an extent
|
||||
if(item >= _backend[i].Item1 &&
|
||||
|
||||
@@ -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="uint" /></summary>
|
||||
public class ExtentsUInt
|
||||
{
|
||||
@@ -72,7 +72,7 @@ public class ExtentsUInt
|
||||
Tuple<uint, uint> removeTwo = null;
|
||||
Tuple<uint, uint> itemToAdd = null;
|
||||
|
||||
for(var i = 0; i < _backend.Count; i++)
|
||||
for(int i = 0; i < _backend.Count; i++)
|
||||
{
|
||||
// Already contained in an extent
|
||||
if(item >= _backend[i].Item1 &&
|
||||
|
||||
@@ -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(var i = 0; i < _backend.Count; i++)
|
||||
for(int i = 0; i < _backend.Count; i++)
|
||||
{
|
||||
// Already contained in an extent
|
||||
if(item >= _backend[i].Item1 &&
|
||||
|
||||
@@ -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="ushort" /></summary>
|
||||
public class ExtentsUShort
|
||||
{
|
||||
@@ -72,7 +72,7 @@ public class ExtentsUShort
|
||||
Tuple<ushort, ushort> removeTwo = null;
|
||||
Tuple<ushort, ushort> itemToAdd = null;
|
||||
|
||||
for(var i = 0; i < _backend.Count; i++)
|
||||
for(int i = 0; i < _backend.Count; i++)
|
||||
{
|
||||
// Already contained in an extent
|
||||
if(item >= _backend[i].Item1 &&
|
||||
|
||||
Reference in New Issue
Block a user