summaryrefslogtreecommitdiffstats
path: root/modules/mono/glue/GodotSharp/GodotSharp/Core/Rect2I.cs
diff options
context:
space:
mode:
Diffstat (limited to 'modules/mono/glue/GodotSharp/GodotSharp/Core/Rect2I.cs')
-rw-r--r--modules/mono/glue/GodotSharp/GodotSharp/Core/Rect2I.cs7
1 files changed, 5 insertions, 2 deletions
diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/Rect2I.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/Rect2I.cs
index 49fba02b54..ef7e9eacd8 100644
--- a/modules/mono/glue/GodotSharp/GodotSharp/Core/Rect2I.cs
+++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/Rect2I.cs
@@ -1,6 +1,9 @@
using System;
+using System.Diagnostics.CodeAnalysis;
using System.Runtime.InteropServices;
+#nullable enable
+
namespace Godot
{
/// <summary>
@@ -398,7 +401,7 @@ namespace Godot
/// </summary>
/// <param name="obj">The other object to compare.</param>
/// <returns>Whether or not the rect and the other object are equal.</returns>
- public override readonly bool Equals(object obj)
+ public override readonly bool Equals([NotNullWhen(true)] object? obj)
{
return obj is Rect2I other && Equals(other);
}
@@ -435,7 +438,7 @@ namespace Godot
/// Converts this <see cref="Rect2I"/> to a string with the given <paramref name="format"/>.
/// </summary>
/// <returns>A string representation of this rect.</returns>
- public readonly string ToString(string format)
+ public readonly string ToString(string? format)
{
return $"{_position.ToString(format)}, {_size.ToString(format)}";
}