Add missing consts to various method signatures - #772
Merged
Conversation
The retail object has GetUV as a const member; the definition here dropped the
qualifier, so it mangled without the C and never matched. The body was already
correct -- adding const takes it to 100%, and the note about the final return
and the b/blr swaps no longer applies.
zNPCHazard 55/110 -> 56/110 functions
zNPCFXCinematic.h pulls this header into zCutsceneMgr, so that unit rebuilds;
verified on a clean build that it is unaffected (15/18 either way).
…uctor
The retail constructor is
__ct__Q24xhud17font_meter_widgetFRCQ24xhud16font_meter_asset -- FRC, a const
reference. This one took a mutable reference, so it mangled as FR and could
never match. model_widget and meter_widget both already take
`const <x>_asset&`, and the body only reads `init`.
__ct__Q24xhud17font_meter_widget... 0.00% -> 61.13%
The remainder is a genuine body difference (retail is 68 instructions to our
56, and assigns the colours differently), not a naming problem. Verified on
clean builds that no unit's function count changes.
consts to various method signatures
|
| Section | From | To | Bytes | |
|---|---|---|---|---|
| 📈 | .text |
40.98% | 52.89% | +166 |
| Function | From | To | Bytes | |
|---|---|---|---|---|
| 📈 | xhud::font_meter_widget::font_meter_widget(const xhud::font_meter_asset&) |
0.00% | 61.13% | +166 |
main/SB/Game/zNPCHazard
| Section | From | To | Bytes | |
|---|---|---|---|---|
| 📈 | .text |
51.42% | 51.68% | +88 |
| Function | From | To | Bytes | |
|---|---|---|---|---|
| ✅ | UVAModelInfo::GetUV(RwTexCoords*&, int&, RpAtomic*) const |
0.00% | 100.00% | +88 |
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.
Also removed a misleading/outdated comment
Found and fixed via LLM scan