Skip to content

Commit

Permalink
Fix more compiler warnings and errors (mostly CI-visible)
Browse files Browse the repository at this point in the history
  • Loading branch information
smoogipoo committed Feb 1, 2024
1 parent e3deaa2 commit d116bb9
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 8 deletions.
5 changes: 5 additions & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Nullable>enable</Nullable>
</PropertyGroup>
<!-- Workaround for https://github.com/dotnet/roslyn/issues/41640 -->
<PropertyGroup>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<NoWarn>$(NoWarn);CS1591;CS1573</NoWarn>
</PropertyGroup>
<ItemGroup Label="License">
<None Include="$(MSBuildThisFileDirectory)osu-framework.licenseheader">
<Link>osu-framework.licenseheader</Link>
Expand Down
6 changes: 5 additions & 1 deletion osu.Framework.Templates/osu.Framework.Templates.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@
<!-- No lib content for target framework. The warning is meaningless for template packages. -->
<NoWarn>NU5128</NoWarn>
</PropertyGroup>

<!-- Workaround for https://github.com/dotnet/roslyn/issues/41640 -->
<PropertyGroup>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<NoWarn>$(NoWarn);CS1591;CS1573</NoWarn>
</PropertyGroup>
<ItemGroup>
<Content Include="templates\**\*" Exclude="templates\**\bin\**;templates\**\obj\**" />
<Compile Remove="**\*" />
Expand Down
4 changes: 2 additions & 2 deletions osu.Framework/Extensions/OSPlatformExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public static class OSPlatformExtensions
{
/// <summary>
/// Checks whether this <see cref="MemberInfo"/> is supported on the current runtime platform as specified by
/// <see cref="SupportedOSPlatformAttribute"/> and <see cref="UnsupportedOSPlatformAttribute"/>.
/// [SupportedOSPlatform] and [UnsupportedOSPlatform].
/// </summary>
/// <param name="member">The <see cref="MemberInfo"/> to check the attributes of.</param>
/// <returns><c>true</c> if this <paramref name="member"/> is supported, false otherwise.</returns>
Expand All @@ -34,7 +34,7 @@ public static bool IsSupportedOnCurrentOSPlatform(this MemberInfo member)
}

/// <summary>
/// Returns whether the provided <see cref="OSPlatformAttribute"/> matches the current (runtime) platform.
/// Returns whether the provided [OSPlatformAttribute] matches the current (runtime) platform.
/// </summary>
/// <remarks>This is currently a naive check which doesn't support specific OS versions.</remarks>
private static bool matchesCurrentPlatform(OSPlatformAttribute attribute)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ internal abstract class VeldridVertexBatch<T> : IVertexBatch<T>
/// Most documentation recommends that three buffers are used to avoid contention.
///
/// We already have a triple buffer (see <see cref="GameHost.DrawRoots"/>) governing draw nodes.
/// In theory we could set this to two, but there's also a global usage of a vertex batch in <see cref="VeldridRenderer"/> (see <see cref="VeldridRenderer.DefaultQuadBatch"/>).
/// In theory we could set this to two, but there's also a global usage of a vertex batch in <see cref="VeldridRenderer"/> (see <see cref="Renderer.DefaultQuadBatch"/>).
///
/// So this is for now an unfortunate memory overhead. Further work could be done to provide
/// these in a way they were not created per draw-node, reducing buffer overhead from 9 to 3.
Expand Down
4 changes: 2 additions & 2 deletions osu.Framework/Graphics/Veldrid/Shaders/VeldridShaderPart.cs
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ private string loadFile(byte[]? bytes, bool mainFile)
}

/// <summary>
/// Creates a <see cref="VeldridShaderPart"/> based off this shader with a list of attributes passed through as input & output.
/// Creates a <see cref="VeldridShaderPart"/> based off this shader with a list of attributes passed through as input &amp; output.
/// Attributes from the list that are already defined in this shader will be ignored.
/// </summary>
/// <remarks>
Expand All @@ -154,7 +154,7 @@ private string loadFile(byte[]? bytes, bool mainFile)
/// This creates a new <see cref="VeldridShaderPart"/> rather than altering this existing instance since this is cached at a <see cref="IShaderStore"/> level and should remain immutable.
/// </para>
/// </remarks>
/// <param name="attributes">The list of attributes to include in the shader as input & output.</param>
/// <param name="attributes">The list of attributes to include in the shader as input &amp; output.</param>
public VeldridShaderPart WithPassthroughInput(IReadOnlyList<VeldridShaderAttribute> attributes)
{
string result = code;
Expand Down
4 changes: 2 additions & 2 deletions osu.Framework/Utils/PathApproximator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ public static List<Vector2> LagrangePolynomialToPiecewiseLinear(ReadOnlySpan<Vec
/// <param name="learningRate">The rate of optimization. Larger values converge faster but can be unstable.</param>
/// <param name="b1">The B1 parameter for the Adam optimizer. Between 0 and 1.</param>
/// <param name="b2">The B2 parameter for the Adam optimizer. Between 0 and 1.</param>
/// <param name="initialControlPoints">The initial bezier control points to use before optimization. The length of this list should be equal to <see cref="numControlPoints"/>.</param>
/// <param name="initialControlPoints">The initial bezier control points to use before optimization. The length of this list should be equal to <paramref name="numControlPoints"/>.</param>
/// <param name="learnableMask">Mask determining which control point positions are fixed and cannot be changed by the optimiser.</param>
/// <returns>A List of vectors representing the bezier control points.</returns>
public static List<Vector2> PiecewiseLinearToBezier(ReadOnlySpan<Vector2> inputPath,
Expand Down Expand Up @@ -337,7 +337,7 @@ public static List<Vector2> PiecewiseLinearToBezier(ReadOnlySpan<Vector2> inputP
/// <param name="learningRate">The rate of optimization. Larger values converge faster but can be unstable.</param>
/// <param name="b1">The B1 parameter for the Adam optimizer. Between 0 and 1.</param>
/// <param name="b2">The B2 parameter for the Adam optimizer. Between 0 and 1.</param>
/// <param name="initialControlPoints">The initial B-spline control points to use before optimization. The length of this list should be equal to <see cref="numControlPoints"/>.</param>
/// <param name="initialControlPoints">The initial B-spline control points to use before optimization. The length of this list should be equal to <paramref name="numControlPoints"/>.</param>
/// <param name="learnableMask">Mask determining which control point positions are fixed and cannot be changed by the optimiser.</param>
/// <returns>A List of vectors representing the B-spline control points.</returns>
public static List<Vector2> PiecewiseLinearToBSpline(ReadOnlySpan<Vector2> inputPath,
Expand Down

0 comments on commit d116bb9

Please sign in to comment.