1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-29 15:23:05 +04:00

Merge pull request #27976 from asmorkalov:as/size_t_fix_win32

Fixed ptrdiff_t cast on windows 32-bit #27976

### Pull Request Readiness Checklist

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

- [x] I agree to contribute to the project under Apache 2 License.
- [x] 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
- [x] 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
This commit is contained in:
Alexander Smorkalov
2025-11-08 17:07:36 +03:00
committed by GitHub
parent 6862afb2c1
commit 9921531fa4
3 changed files with 1 additions and 9 deletions
-7
View File
@@ -51,13 +51,6 @@ int validateToInt(size_t sz)
return valueInt;
}
int64_t validateToInt64(ptrdiff_t sz)
{
int64_t valueInt = static_cast<int64_t>(sz);
CV_Assert((ptrdiff_t)valueInt == sz);
return valueInt;
}
#define SCALE 14
#define cR (int)(0.299*(1 << SCALE) + 0.5)
#define cG (int)(0.587*(1 << SCALE) + 0.5)