in modifier for b2Polygon#86
Conversation
|
Thanks for pointing this out. I checked the warning, and the issue is not In this case For this specific code path we only need read-only access, so I will add a dedicated [MethodImpl(MethodImplOptions.AggressiveInlining)]
public readonly ReadOnlySpan<T> AsReadOnlySpan()
{
return MemoryMarshal.CreateReadOnlySpan(ref Unsafe.AsRef(in _v0000), Size);
}There is one additional compatibility detail: the project still targets netstandard2.1, and Unsafe is not available there unless the package is referenced explicitly. To keep netstandard2.1 compatibility, I will add the following package reference: <ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.1'">
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="6.1.2" />
</ItemGroup>So the fix will be: Add AsReadOnlySpan() for read-only fixed-array access. |
|
The prerequisite work has been completed and merged. |
636f35a to
56c9c86
Compare
I did not encounter the warning as specified in #57 (comment).
All warnings from Visual Studio are as follows: