Nullable: System.Numerics.Vectors.dll
authorStephen Toub <stoub@microsoft.com>
Thu, 18 Apr 2019 01:54:15 +0000 (21:54 -0400)
committerStephen Toub <stoub@microsoft.com>
Thu, 9 May 2019 10:42:58 +0000 (06:42 -0400)
Commit migrated from https://github.com/dotnet/corefx/commit/d5cf97fcf466f45e2a7dfc6d0abead8d9ab341b8

src/libraries/System.Numerics.Vectors/src/System.Numerics.Vectors.csproj
src/libraries/System.Numerics.Vectors/src/System/Numerics/Matrix3x2.cs
src/libraries/System.Numerics.Vectors/src/System/Numerics/Matrix4x4.cs
src/libraries/System.Numerics.Vectors/src/System/Numerics/Plane.cs
src/libraries/System.Numerics.Vectors/src/System/Numerics/Quaternion.cs
src/libraries/System.Numerics.Vectors/src/System/Numerics/Vector2.cs
src/libraries/System.Numerics.Vectors/src/System/Numerics/Vector3.cs
src/libraries/System.Numerics.Vectors/src/System/Numerics/Vector4.cs

index 66e40f18733ef120272648351cb9bc4f4cb4039b..29b641c1083fbc6fb44f720bf0f542db11cc4fe7 100644 (file)
@@ -7,6 +7,7 @@
     <HasIntrinsics Condition="'$(TargetsNetCoreApp)'=='true'">true</HasIntrinsics>
     <DefineConstants Condition="'$(HasIntrinsics)'=='true'">$(DefineConstants);HAS_INTRINSICS</DefineConstants>
     <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release;uapaot-Windows_NT-Debug;uapaot-Windows_NT-Release</Configurations>
+    <NullableContextOptions>enable</NullableContextOptions>
   </PropertyGroup>
   <!-- Shared -->
   <ItemGroup>
index 8960138b5bef422cc1025a8c13232249d3f4ed6a..9c9ab1eb1d53ead4d0a26878bebd47534398ec29 100644 (file)
@@ -771,7 +771,7 @@ namespace System.Numerics
         /// </summary>
         /// <param name="obj">The Object to compare against.</param>
         /// <returns>True if the Object is equal to this matrix; False otherwise.</returns>
-        public override readonly bool Equals(object obj)
+        public override readonly bool Equals(object? obj)
         {
             if (obj is Matrix3x2)
             {
index aedbc4a693ad1de3d6b43d6a98adc0760e1f1aae..b7b25d9b34f47deb6b1713cabae26fab188139d9 100644 (file)
@@ -2186,7 +2186,7 @@ namespace System.Numerics
         /// </summary>
         /// <param name="obj">The Object to compare against.</param>
         /// <returns>True if the Object is equal to this matrix; False otherwise.</returns>
-        public override readonly bool Equals(object obj) => (obj is Matrix4x4 other) && (this == other);
+        public override readonly bool Equals(object? obj) => (obj is Matrix4x4 other) && (this == other);
 
         /// <summary>
         /// Returns a String representing this matrix instance.
index 65b43604796ce699e6fb0ee5e5efac291ef4f12e..aa6ab4ff3d028d609781406136319dec094257bc 100644 (file)
@@ -335,7 +335,7 @@ namespace System.Numerics
         /// <param name="obj">The Object to compare against.</param>
         /// <returns>True if the Object is equal to this Plane; False otherwise.</returns>
         [MethodImpl(MethodImplOptions.AggressiveInlining)]
-        public override readonly bool Equals(object obj)
+        public override readonly bool Equals(object? obj)
         {
             if (obj is Plane)
             {
index dd9ba1ae1b558fe53f7a175a767e653841391d0f..4a127c62d338868e12d425612d16aa32bf548a52 100644 (file)
@@ -761,7 +761,7 @@ namespace System.Numerics
         /// </summary>
         /// <param name="obj">The Object to compare against.</param>
         /// <returns>True if the Object is equal to this Quaternion; False otherwise.</returns>
-        public override readonly bool Equals(object obj)
+        public override readonly bool Equals(object? obj)
         {
             if (obj is Quaternion)
             {
index ac195d640067ff94ba1fd544a1d52a5700281980..1826d3902bb6a3b56e94c4d82d66c13fca9296f7 100644 (file)
@@ -65,7 +65,7 @@ namespace System.Numerics
         /// <param name="obj">The Object to compare against.</param>
         /// <returns>True if the Object is equal to this Vector2; False otherwise.</returns>
         [MethodImpl(MethodImplOptions.AggressiveInlining)]
-        public override readonly bool Equals(object obj)
+        public override readonly bool Equals(object? obj)
         {
             if (!(obj is Vector2))
                 return false;
@@ -98,7 +98,7 @@ namespace System.Numerics
         /// <param name="format">The format of individual elements.</param>
         /// <param name="formatProvider">The format provider to use when formatting elements.</param>
         /// <returns>The string representation.</returns>
-        public readonly string ToString(string format, IFormatProvider formatProvider)
+        public readonly string ToString(string? format, IFormatProvider? formatProvider)
         {
             StringBuilder sb = new StringBuilder();
             string separator = NumberFormatInfo.GetInstance(formatProvider).NumberGroupSeparator;
index 105fce667207f0836ec57b4c015e45a87be060b0..19e62f4569624788fb08397b2e1d7f76a0f45222 100644 (file)
@@ -71,7 +71,7 @@ namespace System.Numerics
         /// <param name="obj">The Object to compare against.</param>
         /// <returns>True if the Object is equal to this Vector3; False otherwise.</returns>
         [MethodImpl(MethodImplOptions.AggressiveInlining)]
-        public override readonly bool Equals(object obj)
+        public override readonly bool Equals(object? obj)
         {
             if (!(obj is Vector3))
                 return false;
@@ -104,7 +104,7 @@ namespace System.Numerics
         /// <param name="format">The format of individual elements.</param>
         /// <param name="formatProvider">The format provider to use when formatting elements.</param>
         /// <returns>The string representation.</returns>
-        public readonly string ToString(string format, IFormatProvider formatProvider)
+        public readonly string ToString(string? format, IFormatProvider? formatProvider)
         {
             StringBuilder sb = new StringBuilder();
             string separator = NumberFormatInfo.GetInstance(formatProvider).NumberGroupSeparator;
index a65b72addcf055b912308c6217eea90aaa7fea29..cdabf678be60b38959b2d0f1d46e5c30616d1b7f 100644 (file)
@@ -75,7 +75,7 @@ namespace System.Numerics
         /// <param name="obj">The Object to compare against.</param>
         /// <returns>True if the Object is equal to this Vector4; False otherwise.</returns>
         [MethodImpl(MethodImplOptions.AggressiveInlining)]
-        public override readonly bool Equals(object obj)
+        public override readonly bool Equals(object? obj)
         {
             if (!(obj is Vector4))
                 return false;
@@ -108,7 +108,7 @@ namespace System.Numerics
         /// <param name="format">The format of individual elements.</param>
         /// <param name="formatProvider">The format provider to use when formatting elements.</param>
         /// <returns>The string representation.</returns>
-        public readonly string ToString(string format, IFormatProvider formatProvider)
+        public readonly string ToString(string? format, IFormatProvider? formatProvider)
         {
             StringBuilder sb = new StringBuilder();
             string separator = NumberFormatInfo.GetInstance(formatProvider).NumberGroupSeparator;