< Summary

Information
Class: GridForge.Grids.GridScanScratch
Assembly: GridForge
File(s): /home/runner/work/GridForge/GridForge/src/GridForge/Grids/Support/GridScanScratch.cs
Line coverage
100%
Covered lines: 4
Uncovered lines: 0
Coverable lines: 4
Total lines: 32
Line coverage: 100%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
Clear()100%11100%

File(s)

/home/runner/work/GridForge/GridForge/src/GridForge/Grids/Support/GridScanScratch.cs

#LineLine coverage
 1//=======================================================================
 2// GridScanScratch.cs
 3//=======================================================================
 4// MIT License, Copyright (c) 2024–present David Oravsky (mrdav30)
 5// See LICENSE file in the project root for full license information.
 6//=======================================================================
 7
 8using SwiftCollections;
 9
 10namespace GridForge.Grids;
 11
 12/// <summary>
 13/// Reusable temporary storage for allocation-sensitive grid scan operations.
 14/// </summary>
 15public sealed class GridScanScratch
 16{
 17    internal SwiftList<ScanCell> ScanCells { get; } = new();
 18
 19    internal SwiftHashSet<ushort> ProcessedGrids { get; } = new();
 20
 21    internal SwiftHashSet<ScanCell> ScanCellRedundancy { get; } = new();
 22
 23    /// <summary>
 24    /// Clears all temporary scan state while retaining allocated backing storage.
 25    /// </summary>
 26    public void Clear()
 27    {
 52028        ScanCells.Clear();
 52029        ProcessedGrids.Clear();
 52030        ScanCellRedundancy.Clear();
 52031    }
 32}

Methods/Properties

Clear()