Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions GameFrameX.Foundation.Hash/XxHashHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
public static uint Hash32(Type type)
{
ArgumentNullException.ThrowIfNull(type, nameof(type));
return InternalXxHashHelper.Hash32(type);
return InternalXxHashHelper.Hash32ForType(type);
}

/// <summary>
Expand Down Expand Up @@ -480,7 +480,7 @@
/// <returns>32位无符号整数形式的哈希值 / The 32-bit hash value as an unsigned integer</returns>
/// <exception cref="ArgumentNullException">当 <paramref name="buffer"/> 为 null 时抛出 / Thrown when <paramref name="buffer"/> is null</exception>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static uint Hash32(byte[] buffer)

Check warning on line 483 in GameFrameX.Foundation.Hash/XxHashHelper.cs

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

All 'Hash32' method overloads should be adjacent.

See more on https://sonarcloud.io/project/issues?id=GameFrameX_GameFrameX.Foundation&issues=AZ-v4yo0zwE2ZRrXb0Hz&open=AZ-v4yo0zwE2ZRrXb0Hz&pullRequest=117
{
ArgumentNullException.ThrowIfNull(buffer, nameof(buffer));
var length = buffer.Length;
Expand Down Expand Up @@ -519,7 +519,7 @@
/// <returns>32位无符号整数形式的哈希值 / The 32-bit hash value as an unsigned integer</returns>
/// <exception cref="ArgumentNullException">当 <paramref name="type"/> 为 null 时抛出 / Thrown when <paramref name="type"/> is null</exception>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static uint Hash32(Type type)
public static uint Hash32ForType(Type type)
{
ArgumentNullException.ThrowIfNull(type, nameof(type));
return Hash32(type.FullName);
Expand All @@ -534,7 +534,7 @@
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static uint Hash32<T>()
{
return Hash32(typeof(T));
return Hash32ForType(typeof(T));
}

/// <summary>
Expand Down