Merge pull request #86373 from raulsntos/dotnet/fix-nameof
C#: Use string literal instead of nameof
This commit is contained in:
commit
9d1cbab1c4
|
@ -1142,7 +1142,7 @@ namespace Godot.Collections
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="from">The typed array to convert.</param>
|
/// <param name="from">The typed array to convert.</param>
|
||||||
/// <returns>A new Godot Array, or <see langword="null"/> if <see paramref="from"/> was null.</returns>
|
/// <returns>A new Godot Array, or <see langword="null"/> if <see paramref="from"/> was null.</returns>
|
||||||
[return: NotNullIfNotNull(nameof(from))]
|
[return: NotNullIfNotNull("from")]
|
||||||
public static explicit operator Array?(Array<T>? from)
|
public static explicit operator Array?(Array<T>? from)
|
||||||
{
|
{
|
||||||
return from?._underlyingArray;
|
return from?._underlyingArray;
|
||||||
|
|
|
@ -561,7 +561,7 @@ namespace Godot.Collections
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="from">The typed dictionary to convert.</param>
|
/// <param name="from">The typed dictionary to convert.</param>
|
||||||
/// <returns>A new Godot Dictionary, or <see langword="null"/> if <see paramref="from"/> was null.</returns>
|
/// <returns>A new Godot Dictionary, or <see langword="null"/> if <see paramref="from"/> was null.</returns>
|
||||||
[return: NotNullIfNotNull(nameof(from))]
|
[return: NotNullIfNotNull("from")]
|
||||||
public static explicit operator Dictionary?(Dictionary<TKey, TValue>? from)
|
public static explicit operator Dictionary?(Dictionary<TKey, TValue>? from)
|
||||||
{
|
{
|
||||||
return from?._underlyingDict;
|
return from?._underlyingDict;
|
||||||
|
|
|
@ -241,7 +241,7 @@ namespace Godot.NativeInterop
|
||||||
return variant->Type.ToString();
|
return variant->Type.ToString();
|
||||||
}
|
}
|
||||||
|
|
||||||
internal static void ThrowIfNullPtr(IntPtr ptr, [CallerArgumentExpression(nameof(ptr))] string? paramName = null)
|
internal static void ThrowIfNullPtr(IntPtr ptr, [CallerArgumentExpression("ptr")] string? paramName = null)
|
||||||
{
|
{
|
||||||
if (ptr == IntPtr.Zero)
|
if (ptr == IntPtr.Zero)
|
||||||
{
|
{
|
||||||
|
|
|
@ -138,7 +138,7 @@ namespace Godot
|
||||||
/// Converts this <see cref="NodePath"/> to a string.
|
/// Converts this <see cref="NodePath"/> to a string.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="from">The <see cref="NodePath"/> to convert.</param>
|
/// <param name="from">The <see cref="NodePath"/> to convert.</param>
|
||||||
[return: NotNullIfNotNull(nameof(from))]
|
[return: NotNullIfNotNull("from")]
|
||||||
public static implicit operator string?(NodePath? from) => from?.ToString();
|
public static implicit operator string?(NodePath? from) => from?.ToString();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -84,7 +84,7 @@ namespace Godot
|
||||||
/// Converts a <see cref="StringName"/> to a string.
|
/// Converts a <see cref="StringName"/> to a string.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="from">The <see cref="StringName"/> to convert.</param>
|
/// <param name="from">The <see cref="StringName"/> to convert.</param>
|
||||||
[return: NotNullIfNotNull(nameof(from))]
|
[return: NotNullIfNotNull("from")]
|
||||||
public static implicit operator string?(StringName? from) => from?.ToString();
|
public static implicit operator string?(StringName? from) => from?.ToString();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
Loading…
Reference in New Issue