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
4 changes: 2 additions & 2 deletions GameFrameX.Foundation.Hash/XxHashHelper.cs
Original file line number Diff line number Diff line change
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-vxjs_LJoACkbda4c7&open=AZ-vxjs_LJoACkbda4c7&pullRequest=116
{
ArgumentNullException.ThrowIfNull(buffer, nameof(buffer));
var length = buffer.Length;
Expand All @@ -503,7 +503,7 @@
/// <returns>32位无符号整数形式的哈希值 / The 32-bit hash value as an unsigned integer</returns>
/// <exception cref="ArgumentNullException">当 <paramref name="text"/> 为 null 时抛出 / Thrown when <paramref name="text"/> is null</exception>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static uint Hash32(string text)
public static uint Hash32Core(string text)
{
ArgumentNullException.ThrowIfNull(text, nameof(text));
return Hash32(Encoding.UTF8.GetBytes(text));
Expand All @@ -522,7 +522,7 @@
public static uint Hash32(Type type)
{
ArgumentNullException.ThrowIfNull(type, nameof(type));
return Hash32(type.FullName);
return Hash32Core(type.FullName);
}

/// <summary>
Expand Down