fix(WG): bind SkipClasses config to a local before Tokenize#170
Conversation
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughIn ChangesSkipClasses Config Refactor
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Acore::Tokenize returns string_views into its argument and deletes its rvalue overloads, so passing GetOption's temporary std::string directly fails to compile. Store it in a named local so the views stay valid. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
3a5c2b1 to
c5c97aa
Compare
Summary
Follow-up build fix for #169 (
CFBG.Battlefield.SkipClasses).LoadConfigpasses the temporarystd::stringreturned byGetOptiondirectly intoAcore::Tokenize. SinceTokenizereturnsstd::string_views that point into its argument, its rvalue overloads are deleted, so this fails to compile against a core that has the deleted overloads:Fix: store the option in a named local first, so the views stay valid for the duration of the loop.
Testing
Summary by CodeRabbit
Release Notes
No user-facing changes in this release. Internal code maintenance and optimization have been applied to improve code reliability and maintainability.