Skip to content

Conversation

@Malkierian
Copy link
Contributor

@Malkierian Malkierian commented May 6, 2025

Mostly fixing implicit conversion warnings, but also a few truncation warnings. 9 files this time. The AMMO() = CUR_CAPACITY() lines in hook_handlers.cpp still need addressing, but I wasn't sure how the uint16_t of CUR_CAPACITY was supposed to map to the int8_t of AMMO, and for some reason, CUR_CAPACITY also makes use of an int16_t cast internally, so if anyone has any suggestions on that, I'd appreciate it.

Build Artifacts

@Malkierian
Copy link
Contributor Author

Alright, my only concern about this PR has been confirmed to be a non-issue, so this should be ready to go.

@serprex
Copy link
Contributor

serprex commented May 11, 2025

Which compiler are you looking to reduce warnings from?

@Malkierian
Copy link
Contributor Author

Malkierian commented May 12, 2025

Which compiler are you looking to reduce warnings from?

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.
Copy link
Contributor

@briaguya0 briaguya0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

non-blocking: since all of these casts are in cpp i'd prefer to have them as static_casts instead of c-style casts

@Malkierian
Copy link
Contributor Author

Done. Will merge when builds finish.

@Malkierian Malkierian merged commit 45d9fe5 into HarbourMasters:develop May 14, 2025
6 checks passed
@Malkierian Malkierian deleted the warnings-1 branch May 14, 2025 05:55
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants