Commit 11c90ea2 authored by Alexander Alekhin's avatar Alexander Alekhin

cvv: fix build

parent bdf51c3a
...@@ -58,18 +58,10 @@ struct CallMetaData ...@@ -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) ...@@ -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) ...@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment