diff --git a/modules/cvv/CMakeLists.txt b/modules/cvv/CMakeLists.txt index 6c3224192..f77541bc1 100644 --- a/modules/cvv/CMakeLists.txt +++ b/modules/cvv/CMakeLists.txt @@ -4,7 +4,12 @@ if(NOT HAVE_QT5) endif() # we need C++11 and want warnings: -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -Wextra -pedantic") +if(MSVC) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Qstd=c++11 /W4") + add_definitions(/D__func__=__FUNCTION__) +else() + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -Wextra -pedantic") +endif() ocv_warnings_disable(CMAKE_CXX_FLAGS -Wshadow -Wmissing-declarations) # Qt5 diff --git a/modules/cvv/src/impl/filter_call.cpp b/modules/cvv/src/impl/filter_call.cpp index ccdd7de0a..38eb69f0e 100644 --- a/modules/cvv/src/impl/filter_call.cpp +++ b/modules/cvv/src/impl/filter_call.cpp @@ -12,8 +12,8 @@ namespace impl FilterCall::FilterCall(cv::InputArray in, cv::InputArray out, impl::CallMetaData data, QString type, QString description, QString requestedView) - : Call{ data, std::move(type), - std::move(description), std::move(requestedView) }, + : Call( data, std::move(type), + std::move(description), std::move(requestedView) ), input_{ in.getMat().clone() }, output_{ out.getMat().clone() } { } diff --git a/modules/cvv/src/impl/match_call.cpp b/modules/cvv/src/impl/match_call.cpp index d46b4ece5..10a759160 100644 --- a/modules/cvv/src/impl/match_call.cpp +++ b/modules/cvv/src/impl/match_call.cpp @@ -18,8 +18,8 @@ MatchCall::MatchCall(cv::InputArray img1, std::vector keypoints1, std::vector matches, impl::CallMetaData data, QString type, QString description, QString requestedView, bool useTrainDescriptor) - : Call{ data, std::move(type), - std::move(description), std::move(requestedView) }, + : Call( data, std::move(type), + std::move(description), std::move(requestedView) ), img1_{ img1.getMat().clone() }, keypoints1_{ std::move(keypoints1) }, img2_{ img2.getMat().clone() }, keypoints2_{ std::move(keypoints2) }, matches_{ std::move(matches) }, usesTrainDescriptor_{ useTrainDescriptor } diff --git a/modules/cvv/src/impl/single_image_call.cpp b/modules/cvv/src/impl/single_image_call.cpp index b9447e58a..8bb363338 100644 --- a/modules/cvv/src/impl/single_image_call.cpp +++ b/modules/cvv/src/impl/single_image_call.cpp @@ -14,8 +14,8 @@ namespace impl SingleImageCall::SingleImageCall(cv::InputArray img, impl::CallMetaData data, QString type, QString description, QString requestedView) - : Call{ data, std::move(type), - std::move(description), std::move(requestedView) }, + : Call( data, std::move(type), + std::move(description), std::move(requestedView) ), img{ img.getMat().clone() } { } diff --git a/modules/cvv/src/qtutil/matchview/colorutil.hpp b/modules/cvv/src/qtutil/matchview/colorutil.hpp index bdc3a6624..13f93e222 100644 --- a/modules/cvv/src/qtutil/matchview/colorutil.hpp +++ b/modules/cvv/src/qtutil/matchview/colorutil.hpp @@ -1,6 +1,7 @@ #ifndef CVVISUAL_COLOR_UTIL #define CVVISUAL_COLOR_UTIL +#include #include #include diff --git a/modules/cvv/src/qtutil/util.cpp b/modules/cvv/src/qtutil/util.cpp index b1c59f3bc..26f526692 100644 --- a/modules/cvv/src/qtutil/util.cpp +++ b/modules/cvv/src/qtutil/util.cpp @@ -4,6 +4,7 @@ #include #include #include +#include #include #include diff --git a/modules/cvv/src/view/defaultfilterview.cpp b/modules/cvv/src/view/defaultfilterview.cpp index b5f479998..b7f90b6d5 100644 --- a/modules/cvv/src/view/defaultfilterview.cpp +++ b/modules/cvv/src/view/defaultfilterview.cpp @@ -19,7 +19,7 @@ namespace view DefaultFilterView::DefaultFilterView(const std::vector &images, QWidget *parent) - : FilterView{ parent } + : FilterView( parent ) { auto layout = util::make_unique(); diff --git a/modules/cvv/src/view/dual_filter_view.cpp b/modules/cvv/src/view/dual_filter_view.cpp index 37e0fa32a..4e5d3608d 100644 --- a/modules/cvv/src/view/dual_filter_view.cpp +++ b/modules/cvv/src/view/dual_filter_view.cpp @@ -31,7 +31,7 @@ namespace view // neuer Konstruktor DualFilterView::DualFilterView(std::array images, QWidget *parent) - : FilterView{ parent }, rawImages_(images) + : FilterView( parent ), rawImages_(images) { auto layout = util::make_unique(); auto imageLayout = util::make_unique(); diff --git a/modules/cvv/src/view/linematchview.cpp b/modules/cvv/src/view/linematchview.cpp index ca4c711c9..3caa36508 100644 --- a/modules/cvv/src/view/linematchview.cpp +++ b/modules/cvv/src/view/linematchview.cpp @@ -24,7 +24,7 @@ LineMatchView::LineMatchView(std::vector leftKeyPoints, std::vector rightKeyPoints, std::vector matches, cv::Mat leftIm, cv::Mat rightIm, bool usetrainIdx, QWidget *parent) - : MatchView{ parent } + : MatchView( parent ) { std::vector allkeypoints; for(auto key:rightKeyPoints) diff --git a/modules/cvv/src/view/pointmatchview.cpp b/modules/cvv/src/view/pointmatchview.cpp index a6ac4696b..b7874186b 100644 --- a/modules/cvv/src/view/pointmatchview.cpp +++ b/modules/cvv/src/view/pointmatchview.cpp @@ -21,7 +21,7 @@ PointMatchView::PointMatchView(std::vector leftKeyPoints, std::vector matches, cv::Mat leftIm, cv::Mat rightIm, bool usetrainIdx, QWidget *parent) - : MatchView{ parent } + : MatchView( parent ) { auto layout = util::make_unique(); auto accor = util::make_unique(); diff --git a/modules/cvv/src/view/singlefilterview.cpp b/modules/cvv/src/view/singlefilterview.cpp index 3fcc69dbb..7eb9d4d32 100644 --- a/modules/cvv/src/view/singlefilterview.cpp +++ b/modules/cvv/src/view/singlefilterview.cpp @@ -20,7 +20,7 @@ namespace view SingleFilterView::SingleFilterView(const std::vector &images, QWidget *parent) - : FilterView{ parent } + : FilterView( parent ) { auto imwid = util::make_unique(); auto accor = util::make_unique(); diff --git a/modules/cvv/src/view/translationsmatchview.cpp b/modules/cvv/src/view/translationsmatchview.cpp index 804c9e709..d0fe0ac24 100644 --- a/modules/cvv/src/view/translationsmatchview.cpp +++ b/modules/cvv/src/view/translationsmatchview.cpp @@ -19,7 +19,7 @@ TranslationMatchView::TranslationMatchView( std::vector leftKeyPoints, std::vector rightKeyPoints, std::vector matches, cv::Mat leftIm, cv::Mat rightIm, bool usetrainIdx, QWidget *parent) - : MatchView{ parent } + : MatchView( parent ) { std::vector allkeypoints; for(auto key:rightKeyPoints)