Skip to content

Commit 6f887c2

Browse files
author
erwan-joly
committed
bump
1 parent ecffe38 commit 6f887c2

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/NosCore.PathFinder/NosCore.PathFinder.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<RepositoryUrl>https://github.com/NosCoreIO/NosCore.PathFinder.git</RepositoryUrl>
1313
<PackageIconUrl></PackageIconUrl>
1414
<PackageTags>nostale, noscore, nostale private server source, nostale emulator</PackageTags>
15-
<Version>1.1.0</Version>
15+
<Version>2.0.0</Version>
1616
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
1717
<Description>NosCore's PathFinder</Description>
1818
<PackageLicenseExpression></PackageLicenseExpression>

src/NosCore.PathFinder/Pathfinder/JumpPointSearchPathfinder.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,9 @@ public JumpPointSearchPathfinder(IMapGrid mapGrid, IHeuristic heuristic)
5959

6060
public IEnumerable<(short X, short Y)> FindPath((short X, short Y) start, (short X, short Y) end)
6161
{
62-
if (Cache.TryGetValue((start, end), out IEnumerable<(short X, short Y)> cachedList))
62+
if (Cache.TryGetValue((start, end), out IEnumerable<(short X, short Y)>? cachedList))
6363
{
64-
return cachedList;
64+
return cachedList ?? Array.Empty<(short X, short Y)>();
6565
}
6666

6767
var path = BuildFullPath(GetJumpList(start, end).ToList());
@@ -94,7 +94,7 @@ public JumpPointSearchPathfinder(IMapGrid mapGrid, IHeuristic heuristic)
9494
IdentifySuccessors((JumpNode)node, nodes, end, heap);
9595
}
9696
}
97-
return new (short X, short Y)[0];
97+
return Array.Empty<(short X, short Y)>();
9898
}
9999

100100
private List<(short X, short Y)> Trace(Node node)

0 commit comments

Comments
 (0)