Skip to content

Update mat.inl.hpp to solve the warning C5054#23974

Closed
MRNath wants to merge 1 commit intoopencv:4.xfrom
MRNath:4.x
Closed

Update mat.inl.hpp to solve the warning C5054#23974
MRNath wants to merge 1 commit intoopencv:4.xfrom
MRNath:4.x

Conversation

@MRNath
Copy link
Copy Markdown

@MRNath MRNath commented Jul 12, 2023

use static_cast() to convert the ACCESS_RW,ACCESS_WRITE,ACCESS_Read that after the '+' to solve the waring C5054 in VS2022 c++20

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 another license that is incompatible with OpenCV
  • The PR is proposed to the proper branch
  • There is a reference to the 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

use static_cast<int>() to convert the ACCESS_RW,ACCESS_WRITE,ACCESS_Read that after the '+' to solve the waring C5054 in VS2022 c++20
@mshabunin
Copy link
Copy Markdown
Contributor

This warning has been turned off for this file for clang compiler: see the beginning of the file (-Wdeprecated-enum-enum-conversion). Perhaps we can just disable it for MSVC too.

@asmorkalov
Copy link
Copy Markdown
Contributor

Massive file modification makes it harder to read and causes merge conflicts between branches. Please replace it with warning supression pragma as it's already done there:

#pragma warning( disable: 4127 )

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