Cleanup some warnings.

This commit is contained in:
hondacrx
2021-11-15 16:11:20 -05:00
parent e0f344af25
commit 032f9a55f3
70 changed files with 233 additions and 234 deletions
@@ -222,7 +222,7 @@ public static partial class Detour
raycastLimitSqr = 0f;
}
}
private dtQueryData m_query = new dtQueryData(); //< Sliced query state.
private dtQueryData m_query = new(); //< Sliced query state.
private dtNodePool m_tinyNodePool; //< Pointer to small node pool.
private dtNodePool m_nodePool; //< Pointer to node pool.
@@ -884,7 +884,7 @@ public static partial class Detour
nearestRef = 0;
dtFindNearestPolyQuery query = new dtFindNearestPolyQuery(this, center);
dtFindNearestPolyQuery query = new(this, center);
dtStatus status = queryPolygons(center, halfExtents, filter, query);
if (dtStatusFailed(status))
@@ -1430,7 +1430,7 @@ public static partial class Detour
return DT_FAILURE;
}
dtRaycastHit rayHit = new dtRaycastHit();
dtRaycastHit rayHit = new();
rayHit.maxPath = 0;
int iter = 0;
@@ -2579,7 +2579,7 @@ public static partial class Detour
public dtStatus raycast(dtPolyRef startRef, float[] startPos, float[] endPos, dtQueryFilter filter, ref float t, float[] hitNormal, dtPolyRef[] path, ref uint pathCount, int maxPath)
{
dtRaycastHit hit = new dtRaycastHit();
dtRaycastHit hit = new();
hit.path = path;
hit.maxPath = maxPath;
@@ -2670,16 +2670,16 @@ public static partial class Detour
dtStatus status = DT_SUCCESS;
dtMeshTile prevTile = new dtMeshTile();
dtMeshTile prevTile = new();
dtMeshTile nextTile;
dtPoly prevPoly = new dtPoly();
dtPoly prevPoly = new();
dtPoly nextPoly;
dtPolyRef curRef;
// The API input has been checked already, skip checking internal data.
curRef = startRef;
dtMeshTile tile = new dtMeshTile();
dtPoly poly = new dtPoly();
dtMeshTile tile = new();
dtPoly poly = new();
m_nav.getTileAndPolyByRefUnsafe(curRef, ref tile, ref poly);
nextTile = prevTile = tile;
nextPoly = prevPoly = poly;