< Summary

Information
Class: GridForge.Grids.GridScanScratch
Assembly: GridForge
File(s): /home/runner/work/GridForge/GridForge/src/GridForge/Grids/GridScanScratch.cs
Line coverage
100%
Covered lines: 7
Uncovered lines: 0
Coverable lines: 7
Total lines: 25
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
get_ScanCells()100%11100%
get_ProcessedGrids()100%11100%
get_ScanCellRedundancy()100%11100%
Clear()100%11100%

File(s)

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

#LineLine coverage
 1using SwiftCollections;
 2
 3namespace GridForge.Grids;
 4
 5/// <summary>
 6/// Reusable temporary storage for allocation-sensitive grid scan operations.
 7/// </summary>
 8public sealed class GridScanScratch
 9{
 284010    internal SwiftList<ScanCell> ScanCells { get; } = new();
 11
 51812    internal SwiftHashSet<ushort> ProcessedGrids { get; } = new();
 13
 51814    internal SwiftHashSet<ScanCell> ScanCellRedundancy { get; } = new();
 15
 16    /// <summary>
 17    /// Clears all temporary scan state while retaining allocated backing storage.
 18    /// </summary>
 19    public void Clear()
 20    {
 25821        ScanCells.Clear();
 25822        ProcessedGrids.Clear();
 25823        ScanCellRedundancy.Clear();
 25824    }
 25}