Skip to content

Commit 0678769

Browse files
committed
Fixed Wredundant-move produced by GCC 13.2 (Ubuntu 24.04).
1 parent 3c2bcbf commit 0678769

File tree

8 files changed

+22
-22
lines changed

8 files changed

+22
-22
lines changed

modules/face/src/facemarkLBF.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -667,7 +667,7 @@ Mat FacemarkLBFImpl::BBox::project(const Mat &shape) const {
667667
res(i, 0) = (shape_(i, 0) - x_center) / x_scale;
668668
res(i, 1) = (shape_(i, 1) - y_center) / y_scale;
669669
}
670-
return std::move(res);
670+
return res;
671671
}
672672

673673
// Project relative shape to absolute shape binding to this bbox
@@ -678,7 +678,7 @@ Mat FacemarkLBFImpl::BBox::reproject(const Mat &shape) const {
678678
res(i, 0) = shape_(i, 0)*x_scale + x_center;
679679
res(i, 1) = shape_(i, 1)*y_scale + y_center;
680680
}
681-
return std::move(res);
681+
return res;
682682
}
683683

684684
Mat FacemarkLBFImpl::getMeanShape(std::vector<Mat> &gt_shapes, std::vector<BBox> &bboxes) {
@@ -1039,7 +1039,7 @@ Mat FacemarkLBFImpl::RandomForest::generateLBF(Mat &img, Mat &current_shape, BBo
10391039
lbf_feat(i*trees_n + j) = (i*trees_n + j)*base + code;
10401040
}
10411041
}
1042-
return std::move(lbf_feat);
1042+
return lbf_feat;
10431043
}
10441044

10451045
void FacemarkLBFImpl::RandomForest::write(FileStorage fs, int k) {
@@ -1381,7 +1381,7 @@ Mat FacemarkLBFImpl::Regressor::globalRegressionPredict(const Mat &lbf, int stag
13811381
for (int j = 0; j < lbf.cols; j++) y += w_ptr[lbf_ptr[j]];
13821382
delta_shape(i, 1) = y;
13831383
}
1384-
return std::move(delta_shape);
1384+
return delta_shape;
13851385
} // Regressor::globalRegressionPredict
13861386

13871387
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 std::move(dftImg);
109+
return dftImg;
110110
}
111111

112112

modules/rgbd/perf/perf_tsdf.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ struct SemisphereScene : Scene
139139
Range range(0, frame.rows);
140140
parallel_for_(range, RenderInvoker<SemisphereScene>(frame, pose, reproj, depthFactor, onlySemisphere));
141141

142-
return std::move(frame);
142+
return frame;
143143
}
144144

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

modules/rgbd/test/ocl/test_tsdf.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ struct SemisphereScene : Scene
143143
Range range(0, frame.rows);
144144
parallel_for_(range, RenderInvoker<SemisphereScene>(frame, pose, reproj, depthFactor, onlySemisphere));
145145

146-
return std::move(frame);
146+
return frame;
147147
}
148148

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

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 std::move(frame);
144+
return 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 std::move(frame);
240+
return frame;
241241
}
242242

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

modules/rgbd/test/test_tsdf.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ struct SemisphereScene : Scene
140140
Range range(0, frame.rows);
141141
parallel_for_(range, RenderInvoker<SemisphereScene>(frame, pose, reproj, depthFactor, onlySemisphere));
142142

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

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

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 std::move(T);
116+
return T;
117117
}
118118

119119

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

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

144144

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

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

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

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

279279

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

487-
return std::move(bestM);
487+
return 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 std::move(M);
530+
return 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 std::move(M);
684+
return 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 std::move(M);
704+
return M;
705705
}
706706

707707

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 std::move(flow); // no file - return empty matrix
23+
return 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 std::move(flow);
28+
return 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 std::move(flow);
47+
return flow;
4848
}
4949

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

5757
CV_ENUM(GuideTypes, CV_8UC1, CV_8UC3)

0 commit comments

Comments
 (0)