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`
pull/8869/head
Jiri Horner 8 years ago
parent acce2ded76
commit eb996176ca
  1. 9
      modules/features2d/perf/perf_feature2d.hpp

@ -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__

Loading…
Cancel
Save