mirror of
https://github.com/opencv/opencv.git
synced 2026-07-29 23:33:05 +04:00
feature2d: fix expansion problems with CV_ENUM in perf
* expand arguments before passing them to CV_ENUM. This does not need modifications of CV_ENUM. * added include guards to `perf_feature2d.hpp`
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
#ifndef __OPENCV_PERF_FEATURE2D_HPP__
|
||||
#define __OPENCV_PERF_FEATURE2D_HPP__
|
||||
|
||||
#include "perf_precomp.hpp"
|
||||
|
||||
/* cofiguration for tests of detectors/descriptors. shared between ocl and cpu tests. */
|
||||
@@ -22,8 +25,10 @@ using std::tr1::get;
|
||||
BRISK_DEFAULT, \
|
||||
KAZE_DEFAULT
|
||||
|
||||
#define CV_ENUM_EXPAND(name, ...) CV_ENUM(name, __VA_ARGS__)
|
||||
|
||||
enum Feature2DVals { DETECTORS_ONLY, DETECTORS_EXTRACTORS };
|
||||
CV_ENUM(Feature2DType, DETECTORS_ONLY, DETECTORS_EXTRACTORS)
|
||||
CV_ENUM_EXPAND(Feature2DType, DETECTORS_ONLY, DETECTORS_EXTRACTORS)
|
||||
|
||||
typedef std::tr1::tuple<Feature2DType, string> Feature2DType_String_t;
|
||||
typedef perf::TestBaseWithParam<Feature2DType_String_t> feature2d;
|
||||
@@ -77,3 +82,5 @@ static inline Ptr<Feature2D> getFeature2D(Feature2DType type)
|
||||
return Ptr<Feature2D>();
|
||||
}
|
||||
}
|
||||
|
||||
#endif // __OPENCV_PERF_FEATURE2D_HPP__
|
||||
|
||||
Reference in New Issue
Block a user