mirror of
https://github.com/opencv/opencv.git
synced 2026-07-30 15:53:03 +04:00
Merge pull request #16046 from alalek:issue_15990
* core: disable invalid constructors in C API by default - C API objects will lose their default initializers through constructors * samples: stop using of C API
This commit is contained in:
committed by
GitHub
parent
986c5084a4
commit
f21bde4d9f
@@ -44,8 +44,10 @@
|
||||
#ifndef OPENCV_CORE_TYPES_H
|
||||
#define OPENCV_CORE_TYPES_H
|
||||
|
||||
#if !defined(__OPENCV_BUILD) && !defined(CV__DISABLE_C_API_CTORS)
|
||||
#define CV__ENABLE_C_API_CTORS // enable C API ctors (must be removed)
|
||||
#ifdef CV__ENABLE_C_API_CTORS // invalid C API ctors (must be removed)
|
||||
#if defined(_WIN32) && !defined(CV__SKIP_MESSAGE_MALFORMED_C_API_CTORS)
|
||||
#error "C API ctors don't work on Win32: https://github.com/opencv/opencv/issues/15990"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
//#define CV__VALIDATE_UNUNITIALIZED_VARS 1 // C++11 & GCC only
|
||||
|
||||
Reference in New Issue
Block a user