Repository navigation
Conversation
lusoris
enabled auto-merge (squash)
May 29, 2026 11:27
lusoris
disabled auto-merge
May 29, 2026 11:42
lusoris
marked this pull request as draft
May 29, 2026 11:42
…DR-0839) Three post-C++23-wave files had residual issues that are warnings in C++ but were silently accepted in the C originals: - core/src/fex_ctx_vector.cpp: rename local `capacity` → `new_capacity` to eliminate the -Wshadow hit against the `rfe->capacity` struct member. - core/src/feature/feature_collector.cpp: replace all C-style casts — `(char*)`, `(void*)`, `(FeatureVector**)`, `(VmafFeatureCollector*)`, `(VmafPredictModel*)`, `(decltype(...))`, `(VmafModelFlags)0` — with `static_cast<>`. No behaviour change. - core/src/sycl/common.cpp: replace `(uint8_t*)`, `(size_t)`, and `(unsigned)` C-style casts with `static_cast<>` in the frame-upload and plane-copy paths. No logic changes. Fixes cppcoreguidelines-pro-type-cstyle-cast and bugprone-shadow clang-tidy hits. All three files are fork-local (no upstream counterpart in Netflix/vmaf master). ADR: docs/adr/0839-cpp23-shadow-const-fixes.md Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
lusoris
force-pushed
the
fix/cpp23-shadow-const-fixes
branch
from
May 29, 2026 12:13
493918b to
43d65e8
Compare
Contributor
Author
|
Cascading rebase conflicts. Recreated clean as 6 files in next PR. |
6 of 11 tasks
lusoris
added a commit
that referenced
this pull request
May 30, 2026
…DR-0839) (#258) Mechanical cleanup in 3 post-C++23-wave cpp files: - fex_ctx_vector.cpp: rename local 'capacity' → 'new_capacity' (shadow fix) - feature_collector.cpp: every (T*) C-style cast → static_cast<T*> - sycl/common.cpp: same C-style → static_cast<> pattern Recreates closed PR #196's 6-file targeted change from current master (the original had cascading rebase conflicts from #197+#212+#256 etc). docs/adr/README.md index row already present on master; skipping that file. Co-authored-by: lusoris <lusoris@pm.me> Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Mechanical correctness fixes in three post-C++23-wave
.cppfiles that carriedresidual C-style casts and a shadowed identifier from their C originals:
core/src/fex_ctx_vector.cpp: rename localcapacity→new_capacitytoeliminate the
-Wshadow/bugprone-shadowhit againstrfe->capacity.core/src/feature/feature_collector.cpp: replace every C-style cast(
(char*),(void*),(FeatureVector**),(VmafFeatureCollector*),(VmafPredictModel*),(decltype(...)),(VmafModelFlags)0) withstatic_cast<>. No logic change.core/src/sycl/common.cpp: replace(uint8_t*),(size_t), and(unsigned)C-style casts with
static_cast<>in the frame-upload and plane-copy paths.ADR:
docs/adr/0839-cpp23-shadow-const-fixes.mdSix deliverables checklist (ADR-0108)
## Alternatives consideredAGENTS.mdinvariant note — no rebase-sensitive invariants: all changed files are fork-local C++23 conversions with no upstream counterpartmeson test -C build --suite=fast(no behaviour change; existing tests cover the changed functions)changelog.d/fixed/cpp23-shadow-const-fixes.mddocs/rebase-notes.md— no rebase impact: all changed files are fork-localState.md
No bugs opened or closed; no state.md update needed.
ffmpeg-patches
No public C-API or header changes; no patch update needed.
Test plan
meson test -C build --suite=fastpassesmake lint(clang-tidy) reports no newcppcoreguidelines-pro-type-cstyle-castorbugprone-shadowhits on the three changed files🤖 Generated with Claude Code