Switch methods to block bodies

このコミットが含まれているのは:
Sergio Pedri committed 2022-10-15 09:10:18 -07:00
1 親 16c0fc9aab
コミット b2afb88f30
53ファイル変更
+426 -132

検索条件に一致するファイルはありません

+8 -2
ファイルの表示
@@ -470,12 +470,18 @@ internal struct HashCode
/// <inheritdoc/>
[Obsolete("HashCode is a mutable struct and should not be compared with other HashCodes. Use ToHashCode to retrieve the computed hash code.", error: true)]
[EditorBrowsable(EditorBrowsableState.Never)]
public override int GetHashCode() => throw new NotSupportedException();
public override int GetHashCode()
{
throw new NotSupportedException();
}
/// <inheritdoc/>
[Obsolete("HashCode is a mutable struct and should not be compared with other HashCodes.", error: true)]
[EditorBrowsable(EditorBrowsableState.Never)]
public override bool Equals(object? obj) => throw new NotSupportedException();
public override bool Equals(object? obj)
{
throw new NotSupportedException();
}
/// <summary>
/// Rotates the specified value left by the specified number of bits.
+8 -2
ファイルの表示
@@ -16,10 +16,16 @@ namespace ComputeSharp.SourceGeneration.Models;
internal sealed record DeferredDiagnosticInfo(DiagnosticDescriptor Descriptor, ImmutableArray<string> Arguments)
{
/// <inheritdoc/>
public bool Equals(DeferredDiagnosticInfo? obj) => Comparer.Default.Equals(this, obj);
public bool Equals(DeferredDiagnosticInfo? obj)
{
return Comparer.Default.Equals(this, obj);
}
/// <inheritdoc/>
public override int GetHashCode() => Comparer.Default.GetHashCode(this);
public override int GetHashCode()
{
return Comparer.Default.GetHashCode(this);
}
/// <summary>
/// Creates a new <see cref="DeferredDiagnosticInfo"/> instance with the specified parameters.
+8 -2
ファイルの表示
@@ -23,10 +23,16 @@ internal sealed record DiagnosticInfo(
ImmutableArray<string> Arguments)
{
/// <inheritdoc/>
public bool Equals(DiagnosticInfo? obj) => Comparer.Default.Equals(this, obj);
public bool Equals(DiagnosticInfo? obj)
{
return Comparer.Default.Equals(this, obj);
}
/// <inheritdoc/>
public override int GetHashCode() => Comparer.Default.GetHashCode(this);
public override int GetHashCode()
{
return Comparer.Default.GetHashCode(this);
}
/// <summary>
/// Creates a new <see cref="Diagnostic"/> instance with the state from this model.
+8 -2
ファイルの表示
@@ -112,10 +112,16 @@ internal sealed partial record HierarchyInfo(string FilenameHint, string FullyQu
}
/// <inheritdoc/>
public bool Equals(HierarchyInfo? obj) => Comparer.Default.Equals(this, obj);
public bool Equals(HierarchyInfo? obj)
{
return Comparer.Default.Equals(this, obj);
}
/// <inheritdoc/>
public override int GetHashCode() => Comparer.Default.GetHashCode(this);
public override int GetHashCode()
{
return Comparer.Default.GetHashCode(this);
}
/// <summary>
/// An <see cref="IEqualityComparer{T}"/> implementation for <see cref="HierarchyInfo"/>.