Skip to content

Commit 600905e

Browse files
committed
Merge pull request #557 from nstiurca:fix-cvv-MSVC
2 parents e5229a1 + ec4db04 commit 600905e

12 files changed

+20
-13
lines changed

modules/cvv/CMakeLists.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,12 @@ if(NOT HAVE_QT5)
44
endif()
55

66
# we need C++11 and want warnings:
7-
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -Wextra -pedantic")
7+
if(MSVC)
8+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Qstd=c++11 /W4")
9+
add_definitions(/D__func__=__FUNCTION__)
10+
else()
11+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -Wextra -pedantic")
12+
endif()
813
ocv_warnings_disable(CMAKE_CXX_FLAGS -Wshadow -Wmissing-declarations)
914

1015
# Qt5

modules/cvv/src/impl/filter_call.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ namespace impl
1212
FilterCall::FilterCall(cv::InputArray in, cv::InputArray out,
1313
impl::CallMetaData data, QString type,
1414
QString description, QString requestedView)
15-
: Call{ data, std::move(type),
16-
std::move(description), std::move(requestedView) },
15+
: Call( data, std::move(type),
16+
std::move(description), std::move(requestedView) ),
1717
input_{ in.getMat().clone() }, output_{ out.getMat().clone() }
1818
{
1919
}

modules/cvv/src/impl/match_call.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ MatchCall::MatchCall(cv::InputArray img1, std::vector<cv::KeyPoint> keypoints1,
1818
std::vector<cv::DMatch> matches, impl::CallMetaData data,
1919
QString type, QString description, QString requestedView,
2020
bool useTrainDescriptor)
21-
: Call{ data, std::move(type),
22-
std::move(description), std::move(requestedView) },
21+
: Call( data, std::move(type),
22+
std::move(description), std::move(requestedView) ),
2323
img1_{ img1.getMat().clone() }, keypoints1_{ std::move(keypoints1) },
2424
img2_{ img2.getMat().clone() }, keypoints2_{ std::move(keypoints2) },
2525
matches_{ std::move(matches) }, usesTrainDescriptor_{ useTrainDescriptor }

modules/cvv/src/impl/single_image_call.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ namespace impl
1414
SingleImageCall::SingleImageCall(cv::InputArray img, impl::CallMetaData data,
1515
QString type, QString description,
1616
QString requestedView)
17-
: Call{ data, std::move(type),
18-
std::move(description), std::move(requestedView) },
17+
: Call( data, std::move(type),
18+
std::move(description), std::move(requestedView) ),
1919
img{ img.getMat().clone() }
2020
{
2121
}

modules/cvv/src/qtutil/matchview/colorutil.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#ifndef CVVISUAL_COLOR_UTIL
22
#define CVVISUAL_COLOR_UTIL
33

4+
#include <cstdint>
45
#include <vector>
56

67
#include <QColor>

modules/cvv/src/qtutil/util.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
#include <stdexcept>
55
#include <thread>
66
#include <functional>
7+
#include <memory>
78

89
#include <QDesktopServices>
910
#include <QUrl>

modules/cvv/src/view/defaultfilterview.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ namespace view
1919

2020
DefaultFilterView::DefaultFilterView(const std::vector<cv::Mat> &images,
2121
QWidget *parent)
22-
: FilterView{ parent }
22+
: FilterView( parent )
2323
{
2424

2525
auto layout = util::make_unique<QHBoxLayout>();

modules/cvv/src/view/dual_filter_view.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ namespace view
3131

3232
// neuer Konstruktor
3333
DualFilterView::DualFilterView(std::array<cv::Mat, 2> images, QWidget *parent)
34-
: FilterView{ parent }, rawImages_(images)
34+
: FilterView( parent ), rawImages_(images)
3535
{
3636
auto layout = util::make_unique<QHBoxLayout>();
3737
auto imageLayout = util::make_unique<QHBoxLayout>();

modules/cvv/src/view/linematchview.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ LineMatchView::LineMatchView(std::vector<cv::KeyPoint> leftKeyPoints,
2424
std::vector<cv::KeyPoint> rightKeyPoints,
2525
std::vector<cv::DMatch> matches, cv::Mat leftIm,
2626
cv::Mat rightIm, bool usetrainIdx, QWidget *parent)
27-
: MatchView{ parent }
27+
: MatchView( parent )
2828
{
2929
std::vector<cv::KeyPoint> allkeypoints;
3030
for(auto key:rightKeyPoints)

modules/cvv/src/view/pointmatchview.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ PointMatchView::PointMatchView(std::vector<cv::KeyPoint> leftKeyPoints,
2121
std::vector<cv::DMatch> matches, cv::Mat leftIm,
2222
cv::Mat rightIm, bool usetrainIdx,
2323
QWidget *parent)
24-
: MatchView{ parent }
24+
: MatchView( parent )
2525
{
2626
auto layout = util::make_unique<QHBoxLayout>();
2727
auto accor = util::make_unique<qtutil::Accordion>();

0 commit comments

Comments
 (0)