added macro for denoting region for suppression of "Wdeprecated-declarations"
This commit is contained in:
parent
6bfbcf02cb
commit
19d470749b
@ -210,7 +210,30 @@ enum {
|
|||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
//! Suppress warning "-Wdeprecated-declarations" / C4996
|
||||||
|
|
||||||
|
#if defined(_MSC_VER)
|
||||||
|
#define CV_DO_PRAGMA(x) __pragma(x)
|
||||||
|
#elif defined(__GNUC__)
|
||||||
|
#define CV_DO_PRAGMA(x) _Pragma (#x)
|
||||||
|
#else
|
||||||
|
#define CV_DO_PRAGMA(x)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
#define CV_SUPPRESS_DEPRECATED_START \
|
||||||
|
CV_DO_PRAGMA(warning(push)) \
|
||||||
|
CV_DO_PRAGMA(warning(disable: 4996))
|
||||||
|
#define CV_SUPPRESS_DEPRECATED_END CV_DO_PRAGMA(warning(pop))
|
||||||
|
#elif defined __GNUC__
|
||||||
|
#define CV_SUPPRESS_DEPRECATED_START \
|
||||||
|
CV_DO_PRAGMA(GCC diagnostic push) \
|
||||||
|
CV_DO_PRAGMA(GCC diagnostic ignored "-Wdeprecated-declarations")
|
||||||
|
#define CV_SUPPRESS_DEPRECATED_END CV_DO_PRAGMA(GCC diagnostic pop)
|
||||||
|
#else
|
||||||
|
#define CV_SUPPRESS_DEPRECATED_START
|
||||||
|
#define CV_SUPPRESS_DEPRECATED_END
|
||||||
|
#endif
|
||||||
|
|
||||||
//! Signals an error and raises the exception.
|
//! Signals an error and raises the exception.
|
||||||
/*!
|
/*!
|
||||||
|
@ -4466,7 +4466,9 @@ struct Image2D::Impl
|
|||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
|
CV_SUPPRESS_DEPRECATED_START
|
||||||
handle = clCreateImage2D(context, CL_MEM_READ_WRITE, &format, src.cols, src.rows, 0, NULL, &err);
|
handle = clCreateImage2D(context, CL_MEM_READ_WRITE, &format, src.cols, src.rows, 0, NULL, &err);
|
||||||
|
CV_SUPPRESS_DEPRECATED_END
|
||||||
}
|
}
|
||||||
CV_OclDbgAssert(err == CL_SUCCESS);
|
CV_OclDbgAssert(err == CL_SUCCESS);
|
||||||
|
|
||||||
|
@ -466,7 +466,7 @@ cv::Moments cv::moments( InputArray _src, bool binary )
|
|||||||
if( cn > 1 )
|
if( cn > 1 )
|
||||||
CV_Error( CV_StsBadArg, "Invalid image type (must be single-channel)" );
|
CV_Error( CV_StsBadArg, "Invalid image type (must be single-channel)" );
|
||||||
|
|
||||||
#if (IPP_VERSION_X100 >= 801)
|
#if IPP_VERSION_X100 >= 801 && !defined HAVE_IPP_ICV_ONLY
|
||||||
if (!binary)
|
if (!binary)
|
||||||
{
|
{
|
||||||
IppiSize roi = {mat.cols, mat.rows};
|
IppiSize roi = {mat.cols, mat.rows};
|
||||||
|
@ -341,7 +341,7 @@ static bool ocl_matchTemplate( InputArray _img, InputArray _templ, OutputArray _
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined (HAVE_IPP) && (IPP_VERSION_MAJOR >= 7)
|
#if defined HAVE_IPP && IPP_VERSION_MAJOR >= 7 && !defined HAVE_IPP_ICV_ONLY
|
||||||
|
|
||||||
typedef IppStatus (CV_STDCALL * ippimatchTemplate)(const void*, int, IppiSize, const void*, int, IppiSize, Ipp32f* , int , IppEnum , Ipp8u*);
|
typedef IppStatus (CV_STDCALL * ippimatchTemplate)(const void*, int, IppiSize, const void*, int, IppiSize, Ipp32f* , int , IppEnum , Ipp8u*);
|
||||||
|
|
||||||
@ -423,7 +423,7 @@ void crossCorr( const Mat& img, const Mat& _templ, Mat& corr,
|
|||||||
Size corrsize, int ctype,
|
Size corrsize, int ctype,
|
||||||
Point anchor, double delta, int borderType )
|
Point anchor, double delta, int borderType )
|
||||||
{
|
{
|
||||||
#if defined (HAVE_IPP) && (IPP_VERSION_MAJOR >= 7)
|
#if defined HAVE_IPP && IPP_VERSION_MAJOR >= 7 && !defined HAVE_IPP_ICV_ONLY
|
||||||
if (ipp_crossCorr(img, _templ, corr))
|
if (ipp_crossCorr(img, _templ, corr))
|
||||||
return;
|
return;
|
||||||
#endif
|
#endif
|
||||||
@ -643,7 +643,7 @@ void cv::matchTemplate( InputArray _img, InputArray _templ, OutputArray _result,
|
|||||||
return;
|
return;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined (HAVE_IPP) && (IPP_VERSION_MAJOR >= 7)
|
#if defined HAVE_IPP && IPP_VERSION_MAJOR >= 7 && !defined HAVE_IPP_ICV_ONLY
|
||||||
if (method == CV_TM_SQDIFF && ipp_sqrDistance(img, templ, result))
|
if (method == CV_TM_SQDIFF && ipp_sqrDistance(img, templ, result))
|
||||||
return;
|
return;
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user