fix(Button): keep friend declarations consistent with identical binaries #1178

Merged
coah80 merged 1 commits from agent/bittle/button-friend-declaration into main 2026-10-05 04:10:43 +00:00
coah80 commented 2026-10-05 04:08:50 +00:00 (Migrated from github.com)

Summary

Delete four conditional-preprocessor directives around the existing push_button_queue forward declaration and Button friend. The class definition previously had different tokens depending on IPL_BUTTON_IMPLEMENTATION, violating the C++ one-definition rule across translation units. Declarations, namespace, C linkage, access position, wrapper body, symbols, flags and layout are unchanged. The now-unused source macro is deliberately left alone.

Independent verification

  • All 22 header-dependent units rebuilt
  • All 1,027 entire source ELF objects byte-identical to baseline, not just objdiff scores
  • All 2,717 allocated sections, 117,545 relocations and 15,880 defined-function entries/order unchanged
  • Full report identical; queue remains 28/28 instructions and pool 32/32
  • Parent independently touched the header, rebuilt dependent objects/full43U and checked all1,027 object bytes/full report
  • Full default43U and explicitok pass; DOL byte-identical, SHA1 26116613f624061ba99c8d1a299aaa6efa85670d
  • Rebased onto #1177 / f22468d1e8 and repeated full build/DOL checks
  • Published tree8937a0ae2e312a4f0fabf412d2c44c9b11cb4a68 equals locally tested tree

Evidence: tools/decomp-assist/button-friend-declaration.attempts.md. This fixes source consistency with no percentage gain or unrelated changes. No merge performed.

Note

Remove IPL_BUTTON_IMPLEMENTATION guards from push_button_queue declarations

Drops the IPL_BUTTON_IMPLEMENTATION guard from the ipl::scene::push_button_queue declaration and its friend declaration in OptOutButton in iplButton.h. The declaration and friend relationship are now visible in every translation unit that includes the header. Function signatures, linkage, and symbol configuration are unchanged. Also adds an engineering record of the fix in button-friend-declaration.attempts.md. Risk: none — identical binaries confirmed by comparison.

Macroscope summarized 113371e.

## Summary Delete four conditional-preprocessor directives around the existing push_button_queue forward declaration and Button friend. The class definition previously had different tokens depending on IPL_BUTTON_IMPLEMENTATION, violating the C++ one-definition rule across translation units. Declarations, namespace, C linkage, access position, wrapper body, symbols, flags and layout are unchanged. The now-unused source macro is deliberately left alone. ## Independent verification - All 22 header-dependent units rebuilt - All 1,027 entire source ELF objects byte-identical to baseline, not just objdiff scores - All 2,717 allocated sections, 117,545 relocations and 15,880 defined-function entries/order unchanged - Full report identical; queue remains 28/28 instructions and pool 32/32 - Parent independently touched the header, rebuilt dependent objects/full43U and checked all1,027 object bytes/full report - Full default43U and explicitok pass; DOL byte-identical, SHA1 26116613f624061ba99c8d1a299aaa6efa85670d - Rebased onto #1177 / f22468d1e85040a67a3f718689ddd3a2aae29a33 and repeated full build/DOL checks - Published tree8937a0ae2e312a4f0fabf412d2c44c9b11cb4a68 equals locally tested tree Evidence: tools/decomp-assist/button-friend-declaration.attempts.md. This fixes source consistency with no percentage gain or unrelated changes. No merge performed. <!-- Macroscope's pull request summary starts here --> <!-- Macroscope will only edit the content between these invisible markers, and the markers themselves will not be visible in the GitHub rendered markdown. --> <!-- If you delete either of the start / end markers from your PR's description, Macroscope will append its summary at the bottom of the description. --> > [!NOTE] > ### Remove `IPL_BUTTON_IMPLEMENTATION` guards from `push_button_queue` declarations > Drops the `IPL_BUTTON_IMPLEMENTATION` guard from the `ipl::scene::push_button_queue` declaration and its friend declaration in `OptOutButton` in [iplButton.h](https://github.com/coah80/wii-ipl/pull/1178/files#diff-49b879002c0c8713ce9f8b982f8912df2fb93dfe997efbd1cce28ba16c99d2b1). The declaration and friend relationship are now visible in every translation unit that includes the header. Function signatures, linkage, and symbol configuration are unchanged. Also adds an engineering record of the fix in [button-friend-declaration.attempts.md](https://github.com/coah80/wii-ipl/pull/1178/files#diff-07f70d082bf931b4fd48820629ffd0eb3880983ade78213cfd2a407040dd577c). Risk: none — identical binaries confirmed by comparison. > > <!-- Macroscope's review summary starts here --> > > <sup><a href="https://app.macroscope.com">Macroscope</a> summarized 113371e.</sup> > <!-- Macroscope's review summary ends here --> > <!-- Macroscope's pull request summary ends here -->
coah80 commented 2026-10-05 04:10:40 +00:00 (Migrated from github.com)

Reviewed and merged: rebased on main, full build ok, DOL sha1 26116613f624061ba99c8d1a299aaa6efa85670d, 0 regressions, 0 forbidden patterns.

Reviewed and merged: rebased on main, full build ok, DOL sha1 26116613f624061ba99c8d1a299aaa6efa85670d, 0 regressions, 0 forbidden patterns.
Sign in to join this conversation.