You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
STYLE: Replace declare-then-assign with initialization at declaration
Merge variable declaration and subsequent assignment into a single
initialization-at-declaration statement across Modules/Core/Common.
Fixes forward-reference hazards in itkPyImageFilter.hxx (args used
before declared) and itkImage.hxx (offset table read before computed).
Preserves two-line form where copy/move assignment semantics are
intentionally tested. Add const to immutable variables on changed lines.
-[ ] Lambda captures — no unused captures; `constexpr` variables don't need capture
539
568
-[ ] Loop variables initialized at declaration
569
+
-[ ] Declare-then-assign conversions: if `const T x = func()` is never read downstream, add a test assertion (in test code) or restructure (in production code) — GCC `-Wunused-but-set-variable` fires on captured-but-unread return values
540
570
-[ ]`bool` not used with `|=` for exit-status accumulation — use `int`
541
571
-[ ] Third-party header includes wrapped with appropriate `ITK_CLANG_SUPPRESS_*` macros
542
572
-[ ] Explicit template instantiations in shared-build modules marked `ITK_TEMPLATE_EXPORT`
0 commit comments