Repository navigation
Conversation
…p files The branch-only BuildingsState files get the readability pass the guide asks for: redundant casts dropped, int const on assign-once locals, BOOLEnum for proven 0/1 flags, enum and logic-flag names and countof() for magic numbers, loops instead of do/while and pointer walks where neutral, early returns and if/else instead of ternaries. Every change was measured per file (quick_diff / quick_gl, plain and with stack slots) and reccmp is unchanged for all 165 functions (avg 99.86). Forms that measured worse stay as they were, with a Matching note recording what was tried. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XmXCmagorvAnNswXbnfKuE
This was referenced Nov 19, 2026
This was referenced Dec 2, 2026
The 19 BuildingsState .cpp files main already has at 100% take main's version (add/add conflicts resolved to origin/main), and lightUpBuilding is restored to main's, so the PR no longer changes them. Tool conflicts (README.md, quick_gl.py) resolved to main's. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XmXCmXCVBvESeaU1djQFjp
determineBuildingEntranceFromCustomArea returns BuildingEntranceSearchResult and setupBuildingData takes an int averageHeight in main's header. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XmXCmXCVBvESeaU1djQFjp
Re-measured with a full build after merging origin/main (both resolver sets enabled). The source is unchanged apart from the averageHeight type; MSVC now keeps the address of buildings[buildingID].uid in a stack temporary and still emits the outpost case inline where the original places it after the return. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XmXCmXCVBvESeaU1djQFjp
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XmXCmXCVBvESeaU1djQFjp
The drop from 93.0% to 71.7% after the merge with main bisects to main's 02e7895 (upstream ghidra changes), which adds M_MAPPER_UNKNOWN_248..264 to MappersEnum.hpp. The code itself is untouched: the extra enumerators shift MSVC's internal symbol numbering, which changes which field addresses get CSE'd (reverting only those 17 enumerators restores the old code; a 17-value dummy enum re-breaks it). Under the new numbering countof(this->buildings) as the slot-search bound and reading the cesspit x through a reference give the original's temporaries back (quick_diff 0.8025 -> 0.9816). Build mode: plain (not /GL). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XmXCmXCVBvESeaU1djQFjp
…d (reccmp symbol artefact) The code is byte-identical to the original. reccmp scores it 94.7% only because the loop end immediate (end of the 110-entry cost table, 0x5C2A6C) is symbolized differently on each side: -cmp eax, I<OpenSHC::Game::RenderingDefinedData>::instance (DATA) +cmp eax, FunctionResolver::AddressUsageKeeper<4234672>::initialized (DATA) quick_diff.py shows no instruction difference besides the alignment pad (jmp + lea in the original, npad in our listing). Recorded as 100.0% following main's precedent for 0x004E12C0. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XmXCmXCVBvESeaU1djQFjp
…iveBack remark Measured with a full build and reccmp, both resolver sets on. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XmXCmXCVBvESeaU1djQFjp
This branch has not been deployed
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.
No description provided.