Skip to content

Commit e3c0d11

Browse files
committed
Merge pull request opencv#8876 from alalek:fix_build_msvs
2 parents f71ea4d + 5c0a287 commit e3c0d11

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

modules/core/src/directx.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -794,7 +794,9 @@ void convertToD3D11Texture2D(InputArray src, ID3D11Texture2D* pD3D11Texture2D)
794794

795795
cl_int status = 0;
796796
cl_mem clImage = 0;
797+
#ifdef HAVE_DIRECTX_NV12
797798
cl_mem clImageUV = 0;
799+
#endif
798800

799801
clImage = clCreateFromD3D11Texture2DKHR(context, CL_MEM_WRITE_ONLY, pD3D11Texture2D, 0, &status);
800802
if (status != CL_SUCCESS)

modules/core/test/test_countnonzero.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,8 @@ TEST_P (CountNonZeroND, ndim)
267267
data = 0;
268268
EXPECT_EQ(0, cv::countNonZero(data));
269269
data = Scalar::all(1);
270-
EXPECT_EQ(pow(ONE_SIZE, dims), cv::countNonZero(data));
270+
int expected = static_cast<int>(pow(static_cast<float>(ONE_SIZE), dims));
271+
EXPECT_EQ(expected, cv::countNonZero(data));
271272
}
272273

273274
INSTANTIATE_TEST_CASE_P(Core, CountNonZeroND,

0 commit comments

Comments
 (0)