Skip to content

[GFX-218] 消除 XxHashHelper 的 Sonar S6640 unsafe 代码块违规 - #154

Merged
AlianBlank merged 2 commits into
mainfrom
feature/gfx-218
Aug 5, 2026
Merged

[GFX-218] 消除 XxHashHelper 的 Sonar S6640 unsafe 代码块违规#154
AlianBlank merged 2 commits into
mainfrom
feature/gfx-218

Conversation

@AlianBlank

@AlianBlank AlianBlank commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Linear: GFX-218

Summary by CodeRabbit

  • 性能与稳定性
    • 优化 32 位和 64 位哈希计算流程,提升哈希结果的一致性与可靠性。
    • 保留空值校验,避免无效输入导致异常。

@linear-code

linear-code Bot commented Aug 5, 2026

Copy link
Copy Markdown

GFX-218

@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: bb3921b9-1226-4d5a-9df4-d7748171d2d6

📥 Commits

Reviewing files that changed from the base of the PR and between 5cc9306 and 193c6f1.

📒 Files selected for processing (1)
  • GameFrameX.Foundation.Hash/XxHashHelper.cs

📝 Walkthrough

Walkthrough

InternalXxHashHelper 删除自定义的 32 位和 64 位指针哈希逻辑。字节数组方法改为调用 xxHash32.ComputeHashxxHash64.ComputeHash。空值校验保持不变。

Changes

哈希实现替换

Layer / File(s) Summary
委托字节数组哈希计算
GameFrameX.Foundation.Hash/XxHashHelper.cs
ComputeHash32(byte[])ComputeHash64(byte[]) 改用对应的 xxHash 方法,并传入完整数组长度与零种子。

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 标题明确说明了移除 XxHashHelper 中 Sonar S6640 unsafe 代码块违规的主要变更,与 PR 目标一致。
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/gfx-218

Comment @coderabbitai help to get the list of available commands.

# Conflicts:
#	GameFrameX.Foundation.Hash/XxHashHelper.cs
@sonarqubecloud

sonarqubecloud Bot commented Aug 5, 2026

Copy link
Copy Markdown

@AlianBlank
AlianBlank merged commit 45d5f43 into main Aug 5, 2026
2 checks passed
@AlianBlank
AlianBlank deleted the feature/gfx-218 branch August 5, 2026 05:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant