Skip to content

Commit 9c4f0a9

Browse files
committed
ocl: drop CV_OclDbgAssert
1 parent 8fb48c0 commit 9c4f0a9

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

modules/core/src/ocl.cpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,7 @@
105105

106106
namespace cv { namespace ocl {
107107

108-
#ifdef _DEBUG
109-
#define CV_OclDbgAssert CV_DbgAssert
110-
#else
108+
#ifndef _DEBUG
111109
static bool isRaiseError()
112110
{
113111
static bool initialized = false;
@@ -119,7 +117,6 @@ static bool isRaiseError()
119117
}
120118
return value;
121119
}
122-
#define CV_OclDbgAssert(expr) do { if (isRaiseError()) { CV_Assert(expr); } else { (void)(expr); } } while ((void)0, 0)
123120
#endif
124121

125122
#if CV_OPENCL_TRACE_CHECK
@@ -2717,7 +2714,7 @@ struct Program::Impl
27172714

27182715
handle = clCreateProgramWithSource((cl_context)ctx.ptr(), 1, &srcptr, &srclen, &retval);
27192716
CV_OCL_DBG_CHECK_RESULT(retval, "clCreateProgramWithSource");
2720-
CV_OclDbgAssert(handle && retval == CL_SUCCESS);
2717+
CV_Assert(handle || retval != CL_SUCCESS);
27212718
if (handle && retval == CL_SUCCESS)
27222719
{
27232720
int i, n = (int)ctx.ndevices();

0 commit comments

Comments
 (0)