From f2105419fa25a4784fdbacc11ec7f731b829ca03 Mon Sep 17 00:00:00 2001 From: Vladislav Sovrasov Date: Thu, 7 Sep 2017 12:25:36 +0300 Subject: [PATCH] objdetect: fix wrong cxx11 features check --- .../opencv2/objdetect/detection_based_tracker.hpp | 4 +++- modules/objdetect/src/detection_based_tracker.cpp | 12 ++++++------ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/modules/objdetect/include/opencv2/objdetect/detection_based_tracker.hpp b/modules/objdetect/include/opencv2/objdetect/detection_based_tracker.hpp index b93c8f59ea..07dd587491 100644 --- a/modules/objdetect/include/opencv2/objdetect/detection_based_tracker.hpp +++ b/modules/objdetect/include/opencv2/objdetect/detection_based_tracker.hpp @@ -44,9 +44,11 @@ #ifndef OPENCV_OBJDETECT_DBT_HPP #define OPENCV_OBJDETECT_DBT_HPP +#include + // After this condition removal update blacklist for bindings: modules/python/common.cmake #if defined(__linux__) || defined(LINUX) || defined(__APPLE__) || defined(__ANDROID__) || \ - (defined(__cplusplus) && __cplusplus > 199711L) || (defined(_MSC_VER) && _MSC_VER >= 1700) + defined(CV_CXX11) #include diff --git a/modules/objdetect/src/detection_based_tracker.cpp b/modules/objdetect/src/detection_based_tracker.cpp index 8583e502d3..0097a4f830 100644 --- a/modules/objdetect/src/detection_based_tracker.cpp +++ b/modules/objdetect/src/detection_based_tracker.cpp @@ -44,7 +44,7 @@ #include "precomp.hpp" #include -#if (defined(__cplusplus) && __cplusplus > 199711L) || (defined(_MSC_VER) && _MSC_VER >= 1700) +#ifdef CV_CXX11 #define USE_STD_THREADS #endif @@ -56,9 +56,9 @@ #include #include #include -#else +#else //USE_STD_THREADS #include -#endif +#endif //USE_STD_THREADS #if defined(DEBUG) || defined(_DEBUG) #undef DEBUGLOGS @@ -84,7 +84,7 @@ #define LOGI0(_str, ...) (printf(_str , ## __VA_ARGS__), printf("\n"), fflush(stdout)) #define LOGW0(_str, ...) (printf(_str , ## __VA_ARGS__), printf("\n"), fflush(stdout)) #define LOGE0(_str, ...) (printf(_str , ## __VA_ARGS__), printf("\n"), fflush(stdout)) -#endif +#endif //__ANDROID__ #if DEBUGLOGS #define LOGD(_str, ...) LOGD0(_str , ## __VA_ARGS__) @@ -96,7 +96,7 @@ #define LOGI(...) #define LOGW(...) #define LOGE(...) -#endif +#endif //DEBUGLOGS using namespace cv; @@ -1035,4 +1035,4 @@ const cv::DetectionBasedTracker::Parameters& DetectionBasedTracker::getParameter return parameters; } -#endif +#endif //defined(__linux__) || defined(LINUX) || defined(__APPLE__) || defined(__ANDROID__) || defined(USE_STD_THREADS)