Skip to content

Commit 9d1cbab

Browse files
authored
Merge pull request #86373 from raulsntos/dotnet/fix-nameof
C#: Use string literal instead of nameof
2 parents 3a8524d + abd7927 commit 9d1cbab

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

modules/mono/glue/GodotSharp/GodotSharp/Core/Array.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1142,7 +1142,7 @@ internal static Array<T> CreateTakingOwnershipOfDisposableValue(godot_array nati
11421142
/// </summary>
11431143
/// <param name="from">The typed array to convert.</param>
11441144
/// <returns>A new Godot Array, or <see langword="null"/> if <see paramref="from"/> was null.</returns>
1145-
[return: NotNullIfNotNull(nameof(from))]
1145+
[return: NotNullIfNotNull("from")]
11461146
public static explicit operator Array?(Array<T>? from)
11471147
{
11481148
return from?._underlyingArray;

modules/mono/glue/GodotSharp/GodotSharp/Core/Dictionary.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -561,7 +561,7 @@ internal static Dictionary<TKey, TValue> CreateTakingOwnershipOfDisposableValue(
561561
/// </summary>
562562
/// <param name="from">The typed dictionary to convert.</param>
563563
/// <returns>A new Godot Dictionary, or <see langword="null"/> if <see paramref="from"/> was null.</returns>
564-
[return: NotNullIfNotNull(nameof(from))]
564+
[return: NotNullIfNotNull("from")]
565565
public static explicit operator Dictionary?(Dictionary<TKey, TValue>? from)
566566
{
567567
return from?._underlyingDict;

modules/mono/glue/GodotSharp/GodotSharp/Core/NativeInterop/ExceptionUtils.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ private unsafe static string GetVariantTypeName(godot_variant* variant)
241241
return variant->Type.ToString();
242242
}
243243

244-
internal static void ThrowIfNullPtr(IntPtr ptr, [CallerArgumentExpression(nameof(ptr))] string? paramName = null)
244+
internal static void ThrowIfNullPtr(IntPtr ptr, [CallerArgumentExpression("ptr")] string? paramName = null)
245245
{
246246
if (ptr == IntPtr.Zero)
247247
{

modules/mono/glue/GodotSharp/GodotSharp/Core/NodePath.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ public NodePath(string path)
138138
/// Converts this <see cref="NodePath"/> to a string.
139139
/// </summary>
140140
/// <param name="from">The <see cref="NodePath"/> to convert.</param>
141-
[return: NotNullIfNotNull(nameof(from))]
141+
[return: NotNullIfNotNull("from")]
142142
public static implicit operator string?(NodePath? from) => from?.ToString();
143143

144144
/// <summary>

modules/mono/glue/GodotSharp/GodotSharp/Core/StringName.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ public StringName(string name)
8484
/// Converts a <see cref="StringName"/> to a string.
8585
/// </summary>
8686
/// <param name="from">The <see cref="StringName"/> to convert.</param>
87-
[return: NotNullIfNotNull(nameof(from))]
87+
[return: NotNullIfNotNull("from")]
8888
public static implicit operator string?(StringName? from) => from?.ToString();
8989

9090
/// <summary>

0 commit comments

Comments
 (0)