cvv: fix build

pull/1413/head
Alexander Alekhin 7 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
#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
* value.
*/
#define CVVISUAL_LOCATION \
::cvv::impl::CallMetaData(__FILE__, __LINE__, \
CVVISUAL_FUNCTION_NAME_MACRO)
#define CVVISUAL_LOCATION ::cvv::impl::CallMetaData(__FILE__, __LINE__, CV_Func)
#endif

@ -67,14 +67,14 @@ void changedPixelImage(const cv::Mat& mat0, const cv::Mat& mat1, cv::Mat& out)
template<int Depth, int Channels>
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>;
cv::Mat result=cv::Mat::zeros(mat0.rows, mat0.cols,CV_8U);
bool same;
PixelInType* in0;
PixelInType* in1;
const PixelInType* in0;
const PixelInType* in1;
for(int i=0;i<result.rows;i++)
{
for(int j=0;j<result.cols;j++)

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

Loading…
Cancel
Save