Commit ceaad7fa authored by Maksim Shabunin's avatar Maksim Shabunin

Fixed several warnings produced by clang

parent 5d9fc41b
...@@ -64,21 +64,21 @@ void ViewController::addCallType(const QString typeName, TabFactory constr) ...@@ -64,21 +64,21 @@ void ViewController::addCallType(const QString typeName, TabFactory constr)
ViewController::callTabType[typeName] = constr; ViewController::callTabType[typeName] = constr;
} }
std::unique_ptr<cvv::gui::FilterCallTab> static std::unique_ptr<cvv::gui::FilterCallTab>
makeFilterCallTab(cvv::util::Reference<cvv::impl::Call> call) makeFilterCallTab(cvv::util::Reference<cvv::impl::Call> call)
{ {
return cvv::util::make_unique<cvv::gui::FilterCallTab>( return cvv::util::make_unique<cvv::gui::FilterCallTab>(
*call.castTo<cvv::impl::FilterCall>()); *call.castTo<cvv::impl::FilterCall>());
} }
std::unique_ptr<cvv::gui::MatchCallTab> static std::unique_ptr<cvv::gui::MatchCallTab>
makeMatchCallTab(cvv::util::Reference<cvv::impl::Call> call) makeMatchCallTab(cvv::util::Reference<cvv::impl::Call> call)
{ {
return cvv::util::make_unique<cvv::gui::MatchCallTab>( return cvv::util::make_unique<cvv::gui::MatchCallTab>(
*call.castTo<cvv::impl::MatchCall>()); *call.castTo<cvv::impl::MatchCall>());
} }
std::unique_ptr<cvv::gui::ImageCallTab> static std::unique_ptr<cvv::gui::ImageCallTab>
makeImageCallTab(cvv::util::Reference<cvv::impl::Call> call) makeImageCallTab(cvv::util::Reference<cvv::impl::Call> call)
{ {
return cvv::util::make_unique<cvv::gui::ImageCallTab>( return cvv::util::make_unique<cvv::gui::ImageCallTab>(
......
...@@ -14,7 +14,7 @@ void changedPixelImage(const cv::Mat& mat0, const cv::Mat& mat1, cv::Mat& out); ...@@ -14,7 +14,7 @@ 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);
void changedPixelImage(const cv::Mat& mat0, const cv::Mat& mat1, cv::Mat& out) static void changedPixelImage(const cv::Mat& mat0, const cv::Mat& mat1, cv::Mat& out)
{ {
// need same size // need same size
if (mat0.size() != mat1.size()) if (mat0.size() != mat1.size())
......
...@@ -142,7 +142,7 @@ void KeyPointManagement::setSelection( ...@@ -142,7 +142,7 @@ void KeyPointManagement::setSelection(
void KeyPointManagement::addSetting() void KeyPointManagement::addSetting()
{ {
addSetting(std::move(util::make_unique<KeyPointSettingsSelector>(univers_))); addSetting(util::make_unique<KeyPointSettingsSelector>(univers_));
} }
...@@ -176,7 +176,7 @@ void KeyPointManagement::removeSetting(KeyPointSettingsSelector *setting) ...@@ -176,7 +176,7 @@ void KeyPointManagement::removeSetting(KeyPointSettingsSelector *setting)
void KeyPointManagement::addSelection() void KeyPointManagement::addSelection()
{ {
addSelection(std::move(util::make_unique<KeyPointSelectionSelector>(univers_))); addSelection(util::make_unique<KeyPointSelectionSelector>(univers_));
} }
void KeyPointManagement::addSelection(std::unique_ptr<KeyPointSelectionSelector> selection) void KeyPointManagement::addSelection(std::unique_ptr<KeyPointSelectionSelector> selection)
......
...@@ -137,7 +137,7 @@ void MatchManagement::setSelection( ...@@ -137,7 +137,7 @@ void MatchManagement::setSelection(
void MatchManagement::addSetting() void MatchManagement::addSetting()
{ {
addSetting(std::move(util::make_unique<MatchSettingsSelector>(univers_))); addSetting(util::make_unique<MatchSettingsSelector>(univers_));
} }
...@@ -172,7 +172,7 @@ void MatchManagement::removeSetting(MatchSettingsSelector *setting) ...@@ -172,7 +172,7 @@ void MatchManagement::removeSetting(MatchSettingsSelector *setting)
void MatchManagement::addSelection() void MatchManagement::addSelection()
{ {
addSelection(std::move(util::make_unique<MatchSelectionSelector>(univers_))); addSelection(util::make_unique<MatchSelectionSelector>(univers_));
} }
void MatchManagement::addSelection(std::unique_ptr<MatchSelectionSelector> selection) void MatchManagement::addSelection(std::unique_ptr<MatchSelectionSelector> selection)
......
...@@ -44,7 +44,7 @@ class MatchSceneGraphicsView : public QGraphicsView ...@@ -44,7 +44,7 @@ class MatchSceneGraphicsView : public QGraphicsView
emit signalResized(); emit signalResized();
} }
virtual void contextMenuEvent(QContextMenuEvent *event) virtual void contextMenuEvent(QContextMenuEvent *event) CV_OVERRIDE
{ {
emit signalContextMenu(event->globalPos()); emit signalContextMenu(event->globalPos());
//event->ignore(); //event->ignore();
......
...@@ -335,7 +335,7 @@ bool checkValueRange(const cv::Mat &mat, DepthType<depth> min, ...@@ -335,7 +335,7 @@ bool checkValueRange(const cv::Mat &mat, DepthType<depth> min,
* @param res The error code. * @param res The error code.
* @return The result. * @return The result.
*/ */
std::pair<ImageConversionResult, QImage> errorResult(ImageConversionResult res, static std::pair<ImageConversionResult, QImage> errorResult(ImageConversionResult res,
const cv::Mat &mat) const cv::Mat &mat)
{ {
switch (res) switch (res)
......
...@@ -137,7 +137,7 @@ template <int depth> std::string printPixel(const cv::Mat &mat, int i, int j) ...@@ -137,7 +137,7 @@ template <int depth> std::string printPixel(const cv::Mat &mat, int i, int j)
* @return The channels of pixel mat,col from mat as a string. (or ">6 * @return The channels of pixel mat,col from mat as a string. (or ">6
* channels") * channels")
*/ */
std::string printPixel(const cv::Mat &mat, int i, int j) static std::string printPixel(const cv::Mat &mat, int i, int j)
{ {
if (i >= 0 && j >= 0) if (i >= 0 && j >= 0)
{ {
......
...@@ -41,8 +41,7 @@ DefaultFilterView::DefaultFilterView(const std::vector<cv::Mat> &images, ...@@ -41,8 +41,7 @@ DefaultFilterView::DefaultFilterView(const std::vector<cv::Mat> &images,
accor->insert( accor->insert(
QString("Image Information: ") + QString::number(count), QString("Image Information: ") + QString::number(count),
std::move( util::make_unique<qtutil::ZoomableOptPanel>(*zoomIm));
util::make_unique<qtutil::ZoomableOptPanel>(*zoomIm)));
zoomIm->setMat(image); zoomIm->setMat(image);
...@@ -51,7 +50,7 @@ DefaultFilterView::DefaultFilterView(const std::vector<cv::Mat> &images, ...@@ -51,7 +50,7 @@ DefaultFilterView::DefaultFilterView(const std::vector<cv::Mat> &images,
histogram->setVisible(false); histogram->setVisible(false);
connect(zoomIm.get(), SIGNAL(updateArea(QRectF, qreal)), histogram.get(), SLOT(setArea(QRectF, qreal))); connect(zoomIm.get(), SIGNAL(updateArea(QRectF, qreal)), histogram.get(), SLOT(setArea(QRectF, qreal)));
accor->insert(QString("Histogram: ") + QString::number(count), std::move(util::make_unique<qtutil::HistogramOptPanel>(*histogram))); accor->insert(QString("Histogram: ") + QString::number(count), util::make_unique<qtutil::HistogramOptPanel>(*histogram));
imageLayout->addWidget(zoomIm.release(), 0, count); imageLayout->addWidget(zoomIm.release(), 0, count);
imageLayout->addWidget(histogram.release(), 1, count); imageLayout->addWidget(histogram.release(), 1, count);
......
...@@ -69,8 +69,7 @@ DualFilterView::DualFilterView(std::array<cv::Mat, 2> images, QWidget *parent) ...@@ -69,8 +69,7 @@ DualFilterView::DualFilterView(std::array<cv::Mat, 2> images, QWidget *parent)
accor->insert( accor->insert(
QString("Image Information: ") + QString::number(count), QString("Image Information: ") + QString::number(count),
std::move( util::make_unique<qtutil::ZoomableOptPanel>(*zoomIm));
util::make_unique<qtutil::ZoomableOptPanel>(*zoomIm)));
if (count != 1) if (count != 1)
{ {
...@@ -99,7 +98,7 @@ DualFilterView::DualFilterView(std::array<cv::Mat, 2> images, QWidget *parent) ...@@ -99,7 +98,7 @@ DualFilterView::DualFilterView(std::array<cv::Mat, 2> images, QWidget *parent)
syncVec.push_back(lambda(rawImages_.at(1), 2)); syncVec.push_back(lambda(rawImages_.at(1), 2));
accor->insert("Zoom synchronization", accor->insert("Zoom synchronization",
std::move(util::make_unique<qtutil::SyncZoomWidget>(syncVec)), true, 1); util::make_unique<qtutil::SyncZoomWidget>(syncVec), true, 1);
//ensure that all images have same width //ensure that all images have same width
imwid->setLayout(imageLayout.release()); imwid->setLayout(imageLayout.release());
......
...@@ -32,8 +32,7 @@ ImageView::ImageView(const cv::Mat &image, QWidget *parent) ...@@ -32,8 +32,7 @@ ImageView::ImageView(const cv::Mat &image, QWidget *parent)
accor->setMaximumWidth(300); accor->setMaximumWidth(300);
auto zoomim = util::make_unique<qtutil::ZoomableImage>(); auto zoomim = util::make_unique<qtutil::ZoomableImage>();
accor->insert(QString("ImageInformation:"), accor->insert(QString("ImageInformation:"), util::make_unique<qtutil::ZoomableOptPanel>(*zoomim,false));
std::move(util::make_unique<qtutil::ZoomableOptPanel>(*zoomim,false)));
zoomim->setMat(image); zoomim->setMat(image);
auto histogram = util::make_unique<qtutil::Histogram>(); auto histogram = util::make_unique<qtutil::Histogram>();
...@@ -41,7 +40,7 @@ ImageView::ImageView(const cv::Mat &image, QWidget *parent) ...@@ -41,7 +40,7 @@ ImageView::ImageView(const cv::Mat &image, QWidget *parent)
histogram->setVisible(false); histogram->setVisible(false);
connect(zoomim.get(), SIGNAL(updateArea(QRectF, qreal)), histogram.get(), SLOT(setArea(QRectF, qreal))); connect(zoomim.get(), SIGNAL(updateArea(QRectF, qreal)), histogram.get(), SLOT(setArea(QRectF, qreal)));
accor->insert(QString("Histogram:"), std::move(util::make_unique<qtutil::HistogramOptPanel>(*histogram))); accor->insert(QString("Histogram:"), util::make_unique<qtutil::HistogramOptPanel>(*histogram));
this->image = (*zoomim); this->image = (*zoomim);
imageLayout->addWidget(zoomim.release(), 0, 0); imageLayout->addWidget(zoomim.release(), 0, 0);
......
...@@ -66,18 +66,15 @@ LineMatchView::LineMatchView(std::vector<cv::KeyPoint> leftKeyPoints, ...@@ -66,18 +66,15 @@ LineMatchView::LineMatchView(std::vector<cv::KeyPoint> leftKeyPoints,
accor->insert("Match Settings", std::move(matchmnt)); accor->insert("Match Settings", std::move(matchmnt));
accor->insert("KeyPoint Settings", std::move(keyPointmnt)); accor->insert("KeyPoint Settings", std::move(keyPointmnt));
accor->insert("Show selection in rawview window", accor->insert("Show selection in rawview window",
std::move(util::make_unique<qtutil::ShowInRawView>(leftKeyPoints, util::make_unique<qtutil::ShowInRawView>(leftKeyPoints,
rightKeyPoints, rightKeyPoints,
matches, matches,
matchManagment_, matchManagment_,
keyManagment_))); keyManagment_));
accor->insert("Sync Zoom ", accor->insert("Sync Zoom ", matchscene_ptr->getSyncZoomWidget());
std::move(matchscene_ptr->getSyncZoomWidget())); accor->insert("Left Image ", matchscene_ptr->getLeftMatInfoWidget());
accor->insert("Left Image ", accor->insert("Right Image ", matchscene_ptr->getRightMatInfoWidget());
std::move(matchscene_ptr->getLeftMatInfoWidget()));
accor->insert("Right Image ",
std::move(matchscene_ptr->getRightMatInfoWidget()));
layout->addWidget(accor.release()); layout->addWidget(accor.release());
layout->addWidget(matchscene.release()); layout->addWidget(matchscene.release());
......
...@@ -56,19 +56,19 @@ class LineMatchView : public MatchView ...@@ -56,19 +56,19 @@ class LineMatchView : public MatchView
return matchManagment_->getCurrentSelection(); return matchManagment_->getCurrentSelection();
} }
virtual std::vector<cv::KeyPoint> getKeyPointSelection() virtual std::vector<cv::KeyPoint> getKeyPointSelection() CV_OVERRIDE
{ {
return keyManagment_->getCurrentSelection(); return keyManagment_->getCurrentSelection();
} }
public slots: public slots:
virtual void setMatchSelection(std::vector<cv::DMatch> selection) virtual void setMatchSelection(std::vector<cv::DMatch> selection) CV_OVERRIDE
{ {
matchManagment_->setSelection(selection); matchManagment_->setSelection(selection);
} }
virtual void setKeyPointSelection(std::vector<cv::KeyPoint> selection) virtual void setKeyPointSelection(std::vector<cv::KeyPoint> selection) CV_OVERRIDE
{ {
keyManagment_->setSelection(selection); keyManagment_->setSelection(selection);
} }
......
...@@ -46,11 +46,11 @@ PointMatchView::PointMatchView(std::vector<cv::KeyPoint> leftKeyPoints, ...@@ -46,11 +46,11 @@ PointMatchView::PointMatchView(std::vector<cv::KeyPoint> leftKeyPoints,
accor->insert("Match Settings", std::move(matchmnt)); accor->insert("Match Settings", std::move(matchmnt));
accor->insert("Sync Zoom ", accor->insert("Sync Zoom ",
std::move(matchscene_ptr->getSyncZoomWidget())); matchscene_ptr->getSyncZoomWidget());
accor->insert("Left Image ", accor->insert("Left Image ",
std::move(matchscene_ptr->getLeftMatInfoWidget())); matchscene_ptr->getLeftMatInfoWidget());
accor->insert("Right Image ", accor->insert("Right Image ",
std::move(matchscene_ptr->getRightMatInfoWidget())); matchscene_ptr->getRightMatInfoWidget());
layout->addWidget(accor.release()); layout->addWidget(accor.release());
layout->addWidget(matchscene.release()); layout->addWidget(matchscene.release());
......
...@@ -58,7 +58,7 @@ class PointMatchView : public MatchView ...@@ -58,7 +58,7 @@ class PointMatchView : public MatchView
public slots: public slots:
virtual void setMatchSelection(std::vector<cv::DMatch> selection) virtual void setMatchSelection(std::vector<cv::DMatch> selection) CV_OVERRIDE
{ {
matchManagment_->setSelection(selection); matchManagment_->setSelection(selection);
} }
......
...@@ -44,8 +44,7 @@ SingleFilterView::SingleFilterView(const std::vector<cv::Mat> &images, ...@@ -44,8 +44,7 @@ SingleFilterView::SingleFilterView(const std::vector<cv::Mat> &images,
auto originalZoomIm = util::make_unique<qtutil::ZoomableImage>(image); auto originalZoomIm = util::make_unique<qtutil::ZoomableImage>(image);
accor->insert( accor->insert(
QString("Info original image ") + QString::number(count), QString("Info original image ") + QString::number(count),
std::move( util::make_unique<qtutil::ZoomableOptPanel>(*originalZoomIm));
util::make_unique<qtutil::ZoomableOptPanel>(*originalZoomIm)));
syncVec.push_back(originalZoomIm.get()); syncVec.push_back(originalZoomIm.get());
...@@ -66,8 +65,7 @@ SingleFilterView::SingleFilterView(const std::vector<cv::Mat> &images, ...@@ -66,8 +65,7 @@ SingleFilterView::SingleFilterView(const std::vector<cv::Mat> &images,
accor->insert( accor->insert(
QString("Info filtered image ") + QString::number(count), QString("Info filtered image ") + QString::number(count),
std::move( util::make_unique<qtutil::ZoomableOptPanel>(*filterZoomIm));
util::make_unique<qtutil::ZoomableOptPanel>(*filterZoomIm)));
syncVec.push_back(filterZoomIm.get()); syncVec.push_back(filterZoomIm.get());
...@@ -84,7 +82,7 @@ SingleFilterView::SingleFilterView(const std::vector<cv::Mat> &images, ...@@ -84,7 +82,7 @@ SingleFilterView::SingleFilterView(const std::vector<cv::Mat> &images,
imwid->setLayout(imageLayout.release()); imwid->setLayout(imageLayout.release());
accor->insert("Zoom synchronization", accor->insert("Zoom synchronization",
std::move(util::make_unique<qtutil::SyncZoomWidget>(syncVec)), true, 1); util::make_unique<qtutil::SyncZoomWidget>(syncVec), true, 1);
layout->addWidget(accor.release()); layout->addWidget(accor.release());
layout->addWidget(imwid.release()); layout->addWidget(imwid.release());
......
...@@ -57,17 +57,17 @@ TranslationMatchView::TranslationMatchView( ...@@ -57,17 +57,17 @@ TranslationMatchView::TranslationMatchView(
accor->insert("Match Settings", std::move(matchmnt)); accor->insert("Match Settings", std::move(matchmnt));
accor->insert("KeyPoint Settings", std::move(keyPointmnt)); accor->insert("KeyPoint Settings", std::move(keyPointmnt));
accor->insert("Show selection in rawview window", accor->insert("Show selection in rawview window",
std::move(util::make_unique<qtutil::ShowInRawView>(leftKeyPoints, util::make_unique<qtutil::ShowInRawView>(leftKeyPoints,
rightKeyPoints, rightKeyPoints,
matches, matches,
matchManagment_, matchManagment_,
keyManagment_))); keyManagment_));
accor->insert("Sync Zoom ", accor->insert("Sync Zoom ",
std::move(matchscene_ptr->getSyncZoomWidget())); matchscene_ptr->getSyncZoomWidget());
accor->insert("Left Image ", accor->insert("Left Image ",
std::move(matchscene_ptr->getLeftMatInfoWidget())); matchscene_ptr->getLeftMatInfoWidget());
accor->insert("Right Image ", accor->insert("Right Image ",
std::move(matchscene_ptr->getRightMatInfoWidget())); matchscene_ptr->getRightMatInfoWidget());
layout->addWidget(accor.release()); layout->addWidget(accor.release());
layout->addWidget(matchscene.release()); layout->addWidget(matchscene.release());
......
...@@ -60,19 +60,19 @@ class TranslationMatchView : public MatchView ...@@ -60,19 +60,19 @@ class TranslationMatchView : public MatchView
return matchManagment_->getCurrentSelection(); return matchManagment_->getCurrentSelection();
} }
virtual std::vector<cv::KeyPoint> getKeyPointSelection() virtual std::vector<cv::KeyPoint> getKeyPointSelection() CV_OVERRIDE
{ {
return keyManagment_->getCurrentSelection(); return keyManagment_->getCurrentSelection();
} }
public slots: public slots:
virtual void setMatchSelection(std::vector<cv::DMatch> selection) virtual void setMatchSelection(std::vector<cv::DMatch> selection) CV_OVERRIDE
{ {
matchManagment_->setSelection(selection); matchManagment_->setSelection(selection);
} }
virtual void setKeyPointSelection(std::vector<cv::KeyPoint> selection) virtual void setKeyPointSelection(std::vector<cv::KeyPoint> selection) CV_OVERRIDE
{ {
keyManagment_->setSelection(selection); keyManagment_->setSelection(selection);
} }
......
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