-
Notifications
You must be signed in to change notification settings - Fork 196
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
Fix compiler warnings, bump deps etc. #3318
Conversation
correction: The PR labeler works. So many colourful labels 😆 |
uhm will also disable the sanitizers for now. looks like the leak sanitizer makes the check fail... |
5eb18da
to
7d78303
Compare
src/game_battlealgorithm.cpp
Outdated
@@ -62,9 +62,12 @@ Game_BattleAlgorithm::AlgorithmBase::AlgorithmBase(Type ty, Game_Battler* source | |||
type(ty), source(source), targets(std::move(in_targets)) | |||
{ | |||
assert(source != nullptr); | |||
|
|||
#ifndef NDEBUG |
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.
Does it nag about an empty loop here?
Because asserts are no-ops in release builds anyway, so should be optimized away.
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.
It nags about the unused t loop var when the assert is removed.
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.
Found a better solution involving assert(std::none_of(...))
.
good news: Can reenable the sanitizers. The reported memory leak was a real leak (I assumed its a false positive because of some static buffers in liblcf). The destiny testcase used |
My final contribution before Christmas to get rid of all compiler warnings reported by g++ and clang with
Wall, extra, deprecated
.Can be already reviewed, except:
Unfortunately: This is not ready yet because the unit tests that calculate the attack damage fail. The reason is that the tests never executed because
SUBCASE
s inside a for-loop only executed once. Now they run and fail 🤷 .I think the code itself is correct, just the tests are flawed and nobody noticed as they didn't execute. But fixing this is a bit more involved.