Warnings Squashing Round 1#5469
Merged
Malkierian merged 10 commits intoHarbourMasters:developfrom May 14, 2025
Merged
Conversation
Make non-specified seed init a separate function.
Contributor
Author
|
Alright, my only concern about this PR has been confirmed to be a non-issue, so this should be ready to go. |
Contributor
|
Which compiler are you looking to reduce warnings from? |
serprex
reviewed
May 11, 2025
serprex
reviewed
May 11, 2025
serprex
reviewed
May 11, 2025
Contributor
Author
Oh, right, this is primarily on MSVC, since I'm on Windows, but I would be surprised if some of them weren't also resolving things on other compilers, like the implicit conversion warnings. |
…ed instead. Add proper range notation to `RandomDouble` to denote the lack of inclusivity for the max part of the range.
serprex
approved these changes
May 12, 2025
briaguya0
reviewed
May 13, 2025
Contributor
briaguya0
left a comment
There was a problem hiding this comment.
non-blocking: since all of these casts are in cpp i'd prefer to have them as static_casts instead of c-style casts
Contributor
Author
|
Done. Will merge when builds finish. |
krazyjakee
pushed a commit
to krazyjakee/OOT
that referenced
this pull request
Sep 6, 2025
* Fix truncation warning in `entrance.h`. * Fix type warning in fishsanity.cpp * Fix implicit conversion warnings in BossRush, Mouse, and UIWidgets.hpp. * Add Random_Float and use it in GameInteractor_RawAction.cpp. Make non-specified seed init a separate function. * clang after type change * Fix truncation and conversion warnings in ExtraTraps.cpp. * Resolve type conversion warnings in InputViewer.cpp. * Resolve some type conversion warnings in hook_handlers.cpp. * Remove `Random_Float`, and apply `RandomDouble` where it was being used instead. Add proper range notation to `RandomDouble` to denote the lack of inclusivity for the max part of the range. * Convert c-style casts to static_cast.
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.
Mostly fixing implicit conversion warnings, but also a few truncation warnings. 9 files this time. The
AMMO() = CUR_CAPACITY()lines inhook_handlers.cppstill need addressing, but I wasn't sure how theuint16_tofCUR_CAPACITYwas supposed to map to theint8_tofAMMO, and for some reason,CUR_CAPACITYalso makes use of anint16_tcast internally, so if anyone has any suggestions on that, I'd appreciate it.Build Artifacts