Skip to content

Commit 15032c6

Browse files
committed
Sonar fixes
1 parent c8336a6 commit 15032c6

File tree

6 files changed

+11
-11
lines changed

6 files changed

+11
-11
lines changed

Engine.PathFinding.RecastNavigation/Detour/Tiles/TileCachePolyMesh.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ public static TileCachePolyMesh Build(TileCacheContourSet cset, int nvp)
7979
int[] nextVert = Helper.CreateArray(maxVertices, 0);
8080
int[] firstVert = Helper.CreateArray(VERTEX_BUCKET_COUNT, NULL_IDX);
8181

82-
foreach (var (i, cont) in cset.IterateContours())
82+
foreach (var (_, cont) in cset.IterateContours())
8383
{
8484
// Skip null contours.
8585
int nverts = cont.GetVertexCount();

Engine.PathFinding.RecastNavigation/GraphDebug.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ private static IEnumerable<GraphDebugDataCollection> GetContourBorders(ContourSe
348348
Dictionary<Color4, List<Vector3>> lines = [];
349349

350350
bool empty = true;
351-
foreach (var (i, c) in cset.IterateContours())
351+
foreach (var (_, c) in cset.IterateContours())
352352
{
353353
if (!c.HasVertices())
354354
{
@@ -388,11 +388,11 @@ private static IEnumerable<GraphDebugDataCollection> GetContoursRegions(ContourS
388388
List<Vector3> lines = [];
389389

390390
// Draw centers
391-
foreach (var (i, cont1) in cset.IterateContours())
391+
foreach (var (_, cont1) in cset.IterateContours())
392392
{
393393
var pos1 = cont1.GetContourCenter(orig, cs, ch);
394394

395-
foreach (var (j, v) in cont1.IterateVertices())
395+
foreach (var (_, v) in cont1.IterateVertices())
396396
{
397397
var r = (int)(uint)v.Flag;
398398

@@ -889,7 +889,7 @@ private static IEnumerable<GraphDebugDataCollection> GetTileCacheContourBorders(
889889
Dictionary<Color4, List<Vector3>> lines = [];
890890

891891
bool empty = true;
892-
foreach (var (i, c) in cset.IterateContours())
892+
foreach (var (_, c) in cset.IterateContours())
893893
{
894894
if (!c.HasVertices())
895895
{
@@ -929,11 +929,11 @@ private static IEnumerable<GraphDebugDataCollection> GetTileCacheContoursRegions
929929
List<Vector3> lines = [];
930930

931931
// Draw centers
932-
foreach (var (i, cont1) in cset.IterateContours())
932+
foreach (var (_, cont1) in cset.IterateContours())
933933
{
934934
var pos1 = cont1.GetContourCenter(orig, cs, ch);
935935

936-
foreach (var (j, v) in cont1.IterateVertices())
936+
foreach (var (_, v) in cont1.IterateVertices())
937937
{
938938
var r = (int)(uint)v.Flag;
939939

Engine.PathFinding.RecastNavigation/Recast/Heightfield.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ public int GetSpanCount()
138138
{
139139
int spanCount = 0;
140140

141-
foreach (var (x, y, s) in IterateSpansWithNexts())
141+
foreach (var (_, _, s) in IterateSpansWithNexts())
142142
{
143143
// Skip non walkable spans.
144144
if (s.Area == AreaTypes.RC_NULL_AREA)

Engine.PathFinding.RecastNavigation/Recast/PolyMesh.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ public static PolyMesh Build(ContourSet cset, int nvp)
211211
int[] nextVert = Helper.CreateArray(maxVertices, 0);
212212
int[] firstVert = Helper.CreateArray(VERTEX_BUCKET_COUNT, NULL_IDX);
213213

214-
foreach (var (i, cont) in cset.IterateContours())
214+
foreach (var (_, cont) in cset.IterateContours())
215215
{
216216
// Skip null contours.
217217
int nverts = cont.GetVertexCount();

Engine/Collections/Helpers/PickingQuadTreeNodeHelper.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ private static bool PickAllNode(PickingQuadTreeNode<T> node, PickingRay ray, out
222222

223223
foreach (var child in node.Children)
224224
{
225-
var inBox = Intersection.RayIntersectsBox(ray, child.BoundingBox, out float d);
225+
var inBox = Intersection.RayIntersectsBox(ray, child.BoundingBox, out _);
226226
if (!inBox)
227227
{
228228
continue;

Samples/03 TerrainSamples/SceneModularDungeon/ModularDungeonScene.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -904,7 +904,7 @@ private void UpdateEntities()
904904
.Where(i => Camera.Frustum.Contains(i.Instance.GetBoundingBox()) != ContainmentType.Disjoint)
905905
.Where(i =>
906906
{
907-
if (i.Instance.PickNearest(ray, out var res))
907+
if (i.Instance.PickNearest(ray, out _))
908908
{
909909
return true;
910910
}

0 commit comments

Comments
 (0)