Skip to content

Commit f210541

Browse files
committed
objdetect: fix wrong cxx11 features check
1 parent 2ac57a2 commit f210541

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

modules/objdetect/include/opencv2/objdetect/detection_based_tracker.hpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,11 @@
4444
#ifndef OPENCV_OBJDETECT_DBT_HPP
4545
#define OPENCV_OBJDETECT_DBT_HPP
4646

47+
#include <opencv2/core.hpp>
48+
4749
// After this condition removal update blacklist for bindings: modules/python/common.cmake
4850
#if defined(__linux__) || defined(LINUX) || defined(__APPLE__) || defined(__ANDROID__) || \
49-
(defined(__cplusplus) && __cplusplus > 199711L) || (defined(_MSC_VER) && _MSC_VER >= 1700)
51+
defined(CV_CXX11)
5052

5153
#include <vector>
5254

modules/objdetect/src/detection_based_tracker.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
#include "precomp.hpp"
4545
#include <cassert>
4646

47-
#if (defined(__cplusplus) && __cplusplus > 199711L) || (defined(_MSC_VER) && _MSC_VER >= 1700)
47+
#ifdef CV_CXX11
4848
#define USE_STD_THREADS
4949
#endif
5050

@@ -56,9 +56,9 @@
5656
#include <thread>
5757
#include <mutex>
5858
#include <condition_variable>
59-
#else
59+
#else //USE_STD_THREADS
6060
#include <pthread.h>
61-
#endif
61+
#endif //USE_STD_THREADS
6262

6363
#if defined(DEBUG) || defined(_DEBUG)
6464
#undef DEBUGLOGS
@@ -84,7 +84,7 @@
8484
#define LOGI0(_str, ...) (printf(_str , ## __VA_ARGS__), printf("\n"), fflush(stdout))
8585
#define LOGW0(_str, ...) (printf(_str , ## __VA_ARGS__), printf("\n"), fflush(stdout))
8686
#define LOGE0(_str, ...) (printf(_str , ## __VA_ARGS__), printf("\n"), fflush(stdout))
87-
#endif
87+
#endif //__ANDROID__
8888

8989
#if DEBUGLOGS
9090
#define LOGD(_str, ...) LOGD0(_str , ## __VA_ARGS__)
@@ -96,7 +96,7 @@
9696
#define LOGI(...)
9797
#define LOGW(...)
9898
#define LOGE(...)
99-
#endif
99+
#endif //DEBUGLOGS
100100

101101

102102
using namespace cv;
@@ -1035,4 +1035,4 @@ const cv::DetectionBasedTracker::Parameters& DetectionBasedTracker::getParameter
10351035
return parameters;
10361036
}
10371037

1038-
#endif
1038+
#endif //defined(__linux__) || defined(LINUX) || defined(__APPLE__) || defined(__ANDROID__) || defined(USE_STD_THREADS)

0 commit comments

Comments
 (0)