Skip to content

Commit

Permalink
Improve build and threat warning as errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
amerkoleci committed May 31, 2021
1 parent 8877d34 commit b5916d9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
1 change: 1 addition & 0 deletions src/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<LangVersion>9.0</LangVersion>
<Nullable>enable</Nullable>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>

<GenerateDocumentationFile>true</GenerateDocumentationFile>
<NoWarn>CS1591;CS1701</NoWarn>
Expand Down
14 changes: 7 additions & 7 deletions src/Vortice.Mathematics/Point3.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,22 +24,22 @@ public struct Point3 : IEquatable<Point3>
/// <summary>
/// The X unit <see cref="Point3"/> (1, 0, 0).
/// </summary>
public static readonly Point3 UnitX = new Point3(1, 0, 0);
public static readonly Point3 UnitX = new(1, 0, 0);

/// <summary>
/// The Y unit <see cref="Point3"/> (0, 1, 0).
/// </summary>
public static readonly Point3 UnitY = new Point3(0, 1, 0);
public static readonly Point3 UnitY = new(0, 1, 0);

/// <summary>
/// The Z unit <see cref="Point3"/> (0, 0, 1).
/// </summary>
public static readonly Point3 UnitZ = new Point3(0, 0, 1);
public static readonly Point3 UnitZ = new(0, 0, 1);

/// <summary>
/// A <see cref="Point3"/> with all of its components set to one.
/// </summary>
public static readonly Point3 One = new Point3(1, 1, 1);
public static readonly Point3 One = new(1, 1, 1);

/// <summary>
/// Initializes a new instance of the <see cref="Point3"/> struct.
Expand Down Expand Up @@ -103,7 +103,7 @@ public Point3(Vector3 value)
public int Z { readonly get; set; }

/// <summary>
/// Gets a value indicating whether this <see cref="Point"/> is empty.
/// Gets a value indicating whether this <see cref="System.Drawing.Point"/> is empty.
/// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
public readonly bool IsEmpty => this == Empty;
Expand All @@ -126,14 +126,14 @@ public void Deconstruct(out int x, out int y, out int z)
/// </summary>
/// <param name="value">The value to convert.</param>
/// <returns>The result of the conversion.</returns>
public static explicit operator Vector3(Point3 value) => new Vector3(value.X, value.Y, value.Z);
public static explicit operator Vector3(Point3 value) => new(value.X, value.Y, value.Z);

/// <summary>
/// Performs an explicit conversion from <see cref="Point3"/> to <see cref="Vector4"/>.
/// </summary>
/// <param name="value">The value.</param>
/// <returns>The result of the conversion.</returns>
public static explicit operator Vector4(Point3 value) => new Vector4(value.X, value.Y, value.Z, 0);
public static explicit operator Vector4(Point3 value) => new(value.X, value.Y, value.Z, 0);

/// <summary>
/// Compares two <see cref="Point3"/> objects for equality.
Expand Down

0 comments on commit b5916d9

Please # to comment.