Skip to content

Remove unnecessary condition (will never reach)#18895

Merged
opencv-pushbot merged 1 commit intoopencv:3.4from
oravital7:flip-module
Nov 23, 2020
Merged

Remove unnecessary condition (will never reach)#18895
opencv-pushbot merged 1 commit intoopencv:3.4from
oravital7:flip-module

Conversation

@oravital7
Copy link
Copy Markdown
Contributor

@oravital7 oravital7 commented Nov 22, 2020

The code

    if (flip_mode < 0)
    {
        if (size.width == 1)
            flip_mode = 0;
        if (size.height == 1)
            flip_mode = 1;
    }

above will always override that condition.

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

@asmorkalov asmorkalov self-requested a review November 23, 2020 09:16
@asmorkalov asmorkalov self-assigned this Nov 23, 2020
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.

👍 Looks correct to me.

@opencv-pushbot opencv-pushbot merged commit bf0846f into opencv:3.4 Nov 23, 2020
This was referenced Nov 27, 2020
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.

4 participants