-
Notifications
You must be signed in to change notification settings - Fork 632
Warnings Squashing Round 1 #5469
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Make non-specified seed init a separate function.
|
Alright, my only concern about this PR has been confirmed to be a non-issue, so this should be ready to go. |
|
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.
briaguya0
left a comment
There was a problem hiding this 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
|
Done. Will merge when builds finish. |
* 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.
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