fix: tes singleton ptr#2316
Conversation
📝 WalkthroughWalkthroughThis PR refactors TES singleton access in ChangesTES Singleton Refresh Refactoring
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. Comment |
|
No actionable suggestions for changed features. |
|
✅ A pre-release build is available for this PR: |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
src/Globals.cpp (1)
1-1: PR metadata suggestion: conventional title + issue keywordSuggested title (<=50 chars):
fix(volumetric-shadows): load terrain shadow map
If this maps to a tracked issue, addFixes #.../Addresses #...in the PR description.As per coding guidelines, "When reviewing PRs, please provide suggestions for: 1. Conventional Commit Titles ... 2. Issue References ..."
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/Globals.cpp` at line 1, Update the pull request metadata: change the PR title to a conventional commit style like "fix(volumetric-shadows): load terrain shadow map" and add an issue reference in the PR description (e.g., "Fixes #<issue-number>" or "Addresses #<issue-number>"). Ensure the PR description includes the mapping to the tracked issue and that the new title is ≤50 characters; no code changes are required in Globals.cpp for this metadata update.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/Globals.cpp`:
- Around line 134-138: Replace the conditional assignment in RefreshTES so
game::tes is set directly from RE::TES::GetSingleton() instead of only updating
when non-null; specifically, inside the RefreshTES function assign game::tes =
RE::TES::GetSingleton() to ensure game::tes becomes nullptr when the singleton
is gone (defensive clarity) and avoid preserving a stale pointer.
---
Nitpick comments:
In `@src/Globals.cpp`:
- Line 1: Update the pull request metadata: change the PR title to a
conventional commit style like "fix(volumetric-shadows): load terrain shadow
map" and add an issue reference in the PR description (e.g., "Fixes
#<issue-number>" or "Addresses #<issue-number>"). Ensure the PR description
includes the mapping to the tracked issue and that the new title is ≤50
characters; no code changes are required in Globals.cpp for this metadata
update.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: e373ee70-6b0d-44f8-ae22-e0ab286fe00b
📒 Files selected for processing (1)
src/Globals.cpp
(cherry picked from commit 4bd6800)
(cherry picked from commit 4bd6800)
Fixes globals::game::tes