mirror of
https://github.com/opencv/opencv.git
synced 2025-06-11 11:45:30 +08:00
Fix _DEBUG/NDEBUG handling across modules (#26151)
This commit is contained in:
parent
1e013a07c4
commit
076bfa6431
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user