This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Repository navigation
Fix static analyzer warnings - #3006
Merged
Merged
Conversation
Contributor
Author
There was a problem hiding this comment.
I simply reverted this method to before the refactoring and applied the minimal number of changes required by the new parameters. The refactoring had turned the if statement above here into a no-op, and I’m not sure beginning_center_dist was still correct.
Contributor
|
@1ec5 I spent some time checking on this and took liberty to add 2 more patches here - one that makes |
brunoabinader
force-pushed
the
1ec5-analyzer-2
branch
3 times, most recently
from
November 12, 2015 16:22
fe6e94c to
b2f8c17
Compare
We could reuse all the operators defined in vec2<>, including operator bool() that checks if the contained values are !NaN.
Make use of PrecisionPoint's operator functionalities inherited from vec2<> and reduced overhead eg. offset_y is always 0 so no need to add this to calculation inside the if.
Also renamed secondsAsDuration() to durationInSeconds(): function names should generally put the return type first, the argument type last, to avoid confusion.
1ec5
force-pushed
the
1ec5-analyzer-2
branch
from
November 12, 2015 18:47
b2f8c17 to
48d1c40
Compare
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
This PR fixes the following static analyzer warnings introduced by 5a24ac6 for #2994 and 4d5c633 for #2727:
More details in the commit messages.
/cc @brunoabinader @kkaefer