1
0
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:
Alexander Alekhin
2019-12-05 14:48:18 +03:00
committed by GitHub
parent 986c5084a4
commit f21bde4d9f
4 changed files with 17 additions and 16 deletions
+4 -2
View File
@@ -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