Skip to content

Commit 83fc27c

Browse files
committed
Fixed warnings produced by clang-9.0.0
1 parent a17185c commit 83fc27c

File tree

9 files changed

+23
-26
lines changed

9 files changed

+23
-26
lines changed

modules/cvv/src/impl/call.hpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,6 @@ class Call
101101
Call(const Call &) = default;
102102
Call(Call &&) = default;
103103

104-
Call &operator=(const Call &) = default;
105-
Call &operator=(Call &&) = default;
106-
107104
impl::CallMetaData metaData_;
108105
size_t id;
109106
QString calltype;

modules/face/src/facemarkLBF.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -633,7 +633,7 @@ Mat FacemarkLBFImpl::BBox::project(const Mat &shape) const {
633633
res(i, 0) = (shape_(i, 0) - x_center) / x_scale;
634634
res(i, 1) = (shape_(i, 1) - y_center) / y_scale;
635635
}
636-
return res;
636+
return std::move(res);
637637
}
638638

639639
// Project relative shape to absolute shape binding to this bbox
@@ -644,7 +644,7 @@ Mat FacemarkLBFImpl::BBox::reproject(const Mat &shape) const {
644644
res(i, 0) = shape_(i, 0)*x_scale + x_center;
645645
res(i, 1) = shape_(i, 1)*y_scale + y_center;
646646
}
647-
return res;
647+
return std::move(res);
648648
}
649649

650650
Mat FacemarkLBFImpl::getMeanShape(std::vector<Mat> &gt_shapes, std::vector<BBox> &bboxes) {
@@ -1005,7 +1005,7 @@ Mat FacemarkLBFImpl::RandomForest::generateLBF(Mat &img, Mat &current_shape, BBo
10051005
lbf_feat(i*trees_n + j) = (i*trees_n + j)*base + code;
10061006
}
10071007
}
1008-
return lbf_feat;
1008+
return std::move(lbf_feat);
10091009
}
10101010

10111011
void FacemarkLBFImpl::RandomForest::write(FileStorage fs, int k) {
@@ -1347,7 +1347,7 @@ Mat FacemarkLBFImpl::Regressor::globalRegressionPredict(const Mat &lbf, int stag
13471347
for (int j = 0; j < lbf.cols; j++) y += w_ptr[lbf_ptr[j]];
13481348
delta_shape(i, 1) = y;
13491349
}
1350-
return delta_shape;
1350+
return std::move(delta_shape);
13511351
} // Regressor::globalRegressionPredict
13521352

13531353
Mat FacemarkLBFImpl::Regressor::predict(Mat &img, BBox &bbox) {

modules/face/src/mace.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ struct MACEImpl CV_FINAL : MACE {
106106
complexInput.copyTo(dftImg(Rect(0,0,IMGSIZE,IMGSIZE)));
107107

108108
dft(dftImg, dftImg);
109-
return dftImg;
109+
return std::move(dftImg);
110110
}
111111

112112

modules/ovis/src/ovis.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -603,7 +603,7 @@ class WindowSceneImpl : public WindowScene
603603
node.setScale(value[0], value[1], value[2]);
604604
}
605605

606-
void getEntityProperty(const String& name, int prop, OutputArray value)
606+
void getEntityProperty(const String& name, int prop, OutputArray value) CV_OVERRIDE
607607
{
608608
SceneNode& node = _getSceneNode(sceneMgr, name);
609609
switch(prop)

modules/rgbd/test/test_kinfu.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ struct CubeSpheresScene : Scene
141141
Range range(0, frame.rows);
142142
parallel_for_(range, RenderInvoker<CubeSpheresScene>(frame, pose, reproj, depthFactor));
143143

144-
return frame;
144+
return std::move(frame);
145145
}
146146

147147
std::vector<Affine3f> getPoses() override
@@ -237,7 +237,7 @@ struct RotatingScene : Scene
237237
Range range(0, frame.rows);
238238
parallel_for_(range, RenderInvoker<RotatingScene>(frame, pose, reproj, depthFactor));
239239

240-
return frame;
240+
return std::move(frame);
241241
}
242242

243243
std::vector<Affine3f> getPoses() override

modules/sfm/src/numeric.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ skewMat( const Mat_<T> &x )
140140
x(2), 0 , -x(0),
141141
-x(1), x(0), 0;
142142

143-
return skew;
143+
return std::move(skew);
144144
}
145145

146146
Mat

modules/videostab/src/global_motion.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ static Mat normalizePoints(int npoints, Point2f *points)
113113
T(0,0) = T(1,1) = s;
114114
T(0,2) = -cx*s;
115115
T(1,2) = -cy*s;
116-
return T;
116+
return std::move(T);
117117
}
118118

119119

@@ -138,7 +138,7 @@ static Mat estimateGlobMotionLeastSquaresTranslation(
138138
*rmse = std::sqrt(*rmse / npoints);
139139
}
140140

141-
return M;
141+
return std::move(M);
142142
}
143143

144144

@@ -219,7 +219,7 @@ static Mat estimateGlobMotionLeastSquaresRotation(
219219
*rmse = std::sqrt(*rmse / npoints);
220220
}
221221

222-
return M;
222+
return std::move(M);
223223
}
224224

225225
static Mat estimateGlobMotionLeastSquaresRigid(
@@ -273,7 +273,7 @@ static Mat estimateGlobMotionLeastSquaresRigid(
273273
*rmse = std::sqrt(*rmse / npoints);
274274
}
275275

276-
return M;
276+
return std::move(M);
277277
}
278278

279279

@@ -484,7 +484,7 @@ Mat estimateGlobalMotionRansac(
484484
if (ninliers)
485485
*ninliers = ninliersMax;
486486

487-
return bestM;
487+
return std::move(bestM);
488488
}
489489

490490

@@ -527,7 +527,7 @@ Mat MotionEstimatorRansacL2::estimate(InputArray points0, InputArray points1, bo
527527
if (ok) *ok = false;
528528
}
529529

530-
return M;
530+
return std::move(M);
531531
}
532532

533533

@@ -681,7 +681,7 @@ Mat FromFileMotionReader::estimate(const Mat &/*frame0*/, const Mat &/*frame1*/,
681681
>> M(1,0) >> M(1,1) >> M(1,2)
682682
>> M(2,0) >> M(2,1) >> M(2,2) >> ok_;
683683
if (ok) *ok = ok_;
684-
return M;
684+
return std::move(M);
685685
}
686686

687687

@@ -701,7 +701,7 @@ Mat ToFileMotionWriter::estimate(const Mat &frame0, const Mat &frame1, bool *ok)
701701
<< M(1,0) << " " << M(1,1) << " " << M(1,2) << " "
702702
<< M(2,0) << " " << M(2,1) << " " << M(2,2) << " " << ok_ << std::endl;
703703
if (ok) *ok = ok_;
704-
return M;
704+
return std::move(M);
705705
}
706706

707707

modules/ximgproc/samples/colorize.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -338,11 +338,11 @@ void drawTrajectoryByReference(cv::Mat& img)
338338

339339
if(drawByReference)
340340
{
341-
cv::circle(img, cv::Point2d(x, y), 0.1, cv::Scalar(blue, green, red), -1);
341+
cv::circle(img, cv::Point2d(x, y), 1, cv::Scalar(blue, green, red), -1);
342342
}
343343
else
344344
{
345-
cv::circle(img, cv::Point2d(x, y), 0.1, cv::Scalar(draw_b, draw_g, draw_r), -1);
345+
cv::circle(img, cv::Point2d(x, y), 1, cv::Scalar(draw_b, draw_g, draw_r), -1);
346346
}
347347
}
348348
}

modules/ximgproc/test/test_sparse_match_interpolator.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ Mat readOpticalFlow( const String& path )
2020
Mat_<Point2f> flow;
2121
std::ifstream file(path.c_str(), std::ios_base::binary);
2222
if ( !file.good() )
23-
return flow; // no file - return empty matrix
23+
return std::move(flow); // no file - return empty matrix
2424

2525
float tag;
2626
file.read((char*) &tag, sizeof(float));
2727
if ( tag != FLOW_TAG_FLOAT )
28-
return flow;
28+
return std::move(flow);
2929

3030
int width, height;
3131

@@ -44,14 +44,14 @@ Mat readOpticalFlow( const String& path )
4444
if ( !file.good() )
4545
{
4646
flow.release();
47-
return flow;
47+
return std::move(flow);
4848
}
4949

5050
flow(i, j) = u;
5151
}
5252
}
5353
file.close();
54-
return flow;
54+
return std::move(flow);
5555
}
5656

5757
CV_ENUM(GuideTypes, CV_8UC1, CV_8UC3)

0 commit comments

Comments
 (0)