如果有任何建议意见或组织社团老师同学有意共同建设git,请联系20666093@tongji.edu.cn

提交 076bfa64 编辑于 作者: shyama7004's avatar shyama7004
浏览文件

Fix _DEBUG/NDEBUG handling across modules (#26151)

上级 1e013a07
无相关合并请求
显示 5 个添加11 个删除
+5 -11
......@@ -55,7 +55,7 @@
namespace cv
{
#if defined _DEBUG || defined CV_STATIC_ANALYSIS
#if !defined(NDEBUG) || defined(CV_STATIC_ANALYSIS)
static bool isPlanarObjectPoints(InputArray _objectPoints, double threshold)
{
CV_CheckType(_objectPoints.type(), _objectPoints.type() == CV_32FC3 || _objectPoints.type() == CV_64FC3,
......@@ -932,7 +932,7 @@ int solvePnPGeneric( InputArray _opoints, InputArray _ipoints,
{
CV_Assert(npoints == 4);
#if defined _DEBUG || defined CV_STATIC_ANALYSIS
#if !defined(NDEBUG) || defined(CV_STATIC_ANALYSIS)
double Xs[4][3];
if (opoints.depth() == CV_32F)
{
......
......@@ -450,7 +450,7 @@ It does not throw exception, but terminates the application.
//! @endcond
#if defined _DEBUG || defined CV_STATIC_ANALYSIS
#if !defined(NDEBUG) || defined(CV_STATIC_ANALYSIS)
# define CV_DbgAssert(expr) CV_Assert(expr)
#else
/** replaced with CV_Assert(expr) in Debug configuration */
......
......@@ -19,7 +19,7 @@
#include <opencv2/core/base.hpp>
#define GAPI_Assert CV_Assert
#if defined _DEBUG || defined CV_STATIC_ANALYSIS
#if !defined(NDEBUG) || defined(CV_STATIC_ANALYSIS)
# define GAPI_DbgAssert CV_DbgAssert
#else
# define GAPI_DbgAssert(expr) GAPI_DbgAssertNoOp(expr)
......
......@@ -105,7 +105,7 @@ CfgParamDeviceSelector::CfgParamDeviceSelector(const CfgParams& cfg_params) :
//Create device
UINT creationFlags = 0;//D3D11_CREATE_DEVICE_BGRA_SUPPORT;
#if defined _DEBUG || defined CV_STATIC_ANALYSIS
#if !defined(NDEBUG) || defined(CV_STATIC_ANALYSIS)
// If the project is in a debug build, enable debugging via SDK Layers with this flag.
creationFlags |= D3D11_CREATE_DEVICE_DEBUG;
#endif
......
......@@ -1485,9 +1485,6 @@ double CV_ColorRGBTest::get_success_error_level( int /*test_case_idx*/, int /*i*
void CV_ColorRGBTest::convert_forward( const Mat& src, Mat& dst )
{
int depth = src.depth(), cn = src.channels();
/*#if defined _DEBUG || defined DEBUG
int dst_cn = CV_MAT_CN(dst->type);
#endif*/
int i, j, cols = src.cols;
int g_rshift = dst_bits == 16 ? 2 : 3;
int r_lshift = dst_bits == 16 ? 11 : 10;
......@@ -1571,9 +1568,6 @@ void CV_ColorRGBTest::convert_forward( const Mat& src, Mat& dst )
void CV_ColorRGBTest::convert_backward( const Mat& /*src*/, const Mat& src, Mat& dst )
{
int depth = src.depth(), cn = dst.channels();
/*#if defined _DEBUG || defined DEBUG
int src_cn = CV_MAT_CN(src->type);
#endif*/
int i, j, cols = src.cols;
int g_lshift = dst_bits == 16 ? 2 : 3;
int r_rshift = dst_bits == 16 ? 11 : 10;
......
支持 Markdown
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册