Rename near identifier to avoid Windows macro clash #1983
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
GPU
GUI
help wanted
question
Shaders
Video
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/KytyPS5--KytyPS5!1983
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/1983/head"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@KairosMakki on GitHub · 2026-10-29 21:00 UTC · original
KairosMakki:fix/rename-near-identifier→main· +6 −6 · 1 files · 1 commits · merged 2026-10-29 23:41 UTCRename near identifier to avoid Windows macro clash
On Windows, <windows.h> defines near as an empty macro, a legacy far-pointer keyword. The test file tests/ShaderRayTracingGpuTests.inc uses near as a local variable name, so after preprocessing a declaration like const std::array<float, 8> near {...} turns into const std::array<float, 8> {...}, which is invalid C++. This is why the clang-cl build of shader_recompiler_compute_tests fails with errors such as “expected unqualified-id” and “expected body of lambda expression,” and the build stops at the link step. This change renames the local identifier to nearDist throughout the file, using word boundaries so no larger identifiers are touched
@coderabbitai[bot] on GitHub · 2026-10-29 21:02 UTC · original
Walkthrough
The local
neararray inTrinityBvhIntersectionswas renamed tonearDist. Bounds construction and child-order comparisons now use the new name. Values, bounds, quantization, and comparison rules remain unchanged.Suggested reviewers:
nmzikPriority:
Low
Change: Bug fix
Merge Risk:
Minimal · up to
341f6The rename is limited to the local distance array and its references, with no identified behavior change.
Pre-merge checks:
5
Full details: Docstring Coverage
Explanation
No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 0 files. (1 skipped: 1 unsupported.)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
❤️ Share
Comment
@coderabbitai helpto get the list of available commands.nearin ShaderRayTracingGpuTests.inc is a Windows macro #1984