cvv: fix build

pull/1413/head
Alexander Alekhin 8 years ago
parent bdf51c3a2b
commit 11c90ea23c
  1. 10
      modules/cvv/include/opencv2/cvv/call_meta_data.hpp
  2. 6
      modules/cvv/src/qtutil/filter/changed_pixels_widget.cpp
  3. 2
      modules/cvv/test/test_location.cpp

@ -58,18 +58,10 @@ struct CallMetaData
} // namespaces } // namespaces
#ifdef __GNUC__
#define CVVISUAL_FUNCTION_NAME_MACRO __PRETTY_FUNCTION__
#else
#define CVVISUAL_FUNCTION_NAME_MACRO __func__
#endif
/** /**
* @brief Creates an instance of CallMetaData with the location of the macro as * @brief Creates an instance of CallMetaData with the location of the macro as
* value. * value.
*/ */
#define CVVISUAL_LOCATION \ #define CVVISUAL_LOCATION ::cvv::impl::CallMetaData(__FILE__, __LINE__, CV_Func)
::cvv::impl::CallMetaData(__FILE__, __LINE__, \
CVVISUAL_FUNCTION_NAME_MACRO)
#endif #endif

@ -67,14 +67,14 @@ void changedPixelImage(const cv::Mat& mat0, const cv::Mat& mat1, cv::Mat& out)
template<int Depth, int Channels> template<int Depth, int Channels>
void changedPixelImage(const cv::Mat& mat0, const cv::Mat& mat1, cv::Mat& out) void changedPixelImage(const cv::Mat& mat0, const cv::Mat& mat1, cv::Mat& out)
{ {
using PixelInType=const cvv::qtutil::PixelType<Depth,Channels>; using PixelInType=cvv::qtutil::PixelType<Depth,Channels>;
using PixelOutType=cvv::qtutil::DepthType<CV_8U>; using PixelOutType=cvv::qtutil::DepthType<CV_8U>;
cv::Mat result=cv::Mat::zeros(mat0.rows, mat0.cols,CV_8U); cv::Mat result=cv::Mat::zeros(mat0.rows, mat0.cols,CV_8U);
bool same; bool same;
PixelInType* in0; const PixelInType* in0;
PixelInType* in1; const PixelInType* in1;
for(int i=0;i<result.rows;i++) for(int i=0;i<result.rows;i++)
{ {
for(int j=0;j<result.cols;j++) for(int j=0;j<result.cols;j++)

@ -12,7 +12,7 @@ TEST(LocationTest, FileLineFunction)
auto locationMacroResult = CVVISUAL_LOCATION; auto locationMacroResult = CVVISUAL_LOCATION;
size_t line = __LINE__ - 1; size_t line = __LINE__ - 1;
auto file = __FILE__; auto file = __FILE__;
auto fun = CVVISUAL_FUNCTION_NAME_MACRO; auto fun = CV_Func;
EXPECT_EQ(locationMacroResult.isKnown, true); EXPECT_EQ(locationMacroResult.isKnown, true);
EXPECT_EQ(locationMacroResult.file, file); EXPECT_EQ(locationMacroResult.file, file);
EXPECT_EQ(locationMacroResult.line, line); EXPECT_EQ(locationMacroResult.line, line);

Loading…
Cancel
Save