Skip to content

Reduce if statement as it has the same expression on both sides of '&&'#19525

Merged
alalek merged 2 commits intoopencv:3.4from
danbey:Fix-cppcheck-error-in-carotete-lib
Feb 15, 2021
Merged

Reduce if statement as it has the same expression on both sides of '&&'#19525
alalek merged 2 commits intoopencv:3.4from
danbey:Fix-cppcheck-error-in-carotete-lib

Conversation

@danbey
Copy link
Copy Markdown
Contributor

@danbey danbey commented Feb 13, 2021

If statement has the same expression on both sides so this can be reduce

Signed-off-by: Dan Ben Yosef danbey@gmail.com

Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

  • I agree to contribute to the project under Apache 2 License.
  • To the best of my knowledge, the proposed patch is not based on a code under GPL or other license that is incompatible with OpenCV
  • The PR is proposed to proper branch
  • There is reference to original bug report and related work
  • There is accuracy test, performance test and test data in opencv_extra repository, if applicable
    Patch to opencv_extra has the same branch name.
  • The feature is well documented and sample code can be built with the project CMake

@danbey
Copy link
Copy Markdown
Contributor Author

danbey commented Feb 13, 2021

#19524

Copy link
Copy Markdown
Contributor

@asmorkalov asmorkalov left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution! The same bug exists in branch 3.4 too. This patch should go into 3.4 branch first. We will merge changes from 3.4 into master regularly (weekly/bi-weekly).

So, please:

  • change "base" branch of this PR: master => 3.4 (use "Edit" button near PR title)
  • rebase your commits from master onto 3.4 branch. For example:
    git rebase -i --onto upstream/3.4 upstream/master
    (check list of your commits, save and quit (Esc + "wq" + Enter)
    where upstream is configured by following this GitHub guide and fetched (git fetch upstream).
  • push rebased commits into source branch of your fork (with --force option)

Note: no need to re-open PR, apply changes "inplace".

@asmorkalov asmorkalov added bug category: 3rdparty pr: needs rebase Rebase patch (and squash fixup commits) on the top of target branch labels Feb 15, 2021
If statement has the same expression on both sides so this can be reduce

Signed-off-by: Dan Ben Yosef <danbey@gmail.com>
@danbey danbey changed the base branch from master to 3.4 February 15, 2021 16:26
@danbey danbey force-pushed the Fix-cppcheck-error-in-carotete-lib branch from eec6482 to d26466f Compare February 15, 2021 16:29
Copy link
Copy Markdown
Contributor

@asmorkalov asmorkalov left a comment

Choose a reason for hiding this comment

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

Well done!

@alalek alalek merged commit f044529 into opencv:3.4 Feb 15, 2021
@alalek alalek mentioned this pull request Feb 21, 2021
@danbey danbey deleted the Fix-cppcheck-error-in-carotete-lib branch March 12, 2021 19:28
@alalek alalek mentioned this pull request Apr 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants