Skip to content

Fixed Wredundant-move produced by GCC 13.2 (Ubuntu 24.04). #3734

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
May 15, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions modules/face/src/facemarkLBF.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -667,7 +667,7 @@ Mat FacemarkLBFImpl::BBox::project(const Mat &shape) const {
res(i, 0) = (shape_(i, 0) - x_center) / x_scale;
res(i, 1) = (shape_(i, 1) - y_center) / y_scale;
}
return std::move(res);
return res;
}

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

Mat FacemarkLBFImpl::getMeanShape(std::vector<Mat> &gt_shapes, std::vector<BBox> &bboxes) {
Expand Down Expand Up @@ -1039,7 +1039,7 @@ Mat FacemarkLBFImpl::RandomForest::generateLBF(Mat &img, Mat &current_shape, BBo
lbf_feat(i*trees_n + j) = (i*trees_n + j)*base + code;
}
}
return std::move(lbf_feat);
return lbf_feat;
}

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

Mat FacemarkLBFImpl::Regressor::predict(Mat &img, BBox &bbox) {
Expand Down
2 changes: 1 addition & 1 deletion modules/face/src/mace.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ struct MACEImpl CV_FINAL : MACE {
complexInput.copyTo(dftImg(Rect(0,0,IMGSIZE,IMGSIZE)));

dft(dftImg, dftImg);
return std::move(dftImg);
return dftImg;
}


Expand Down
2 changes: 1 addition & 1 deletion modules/rgbd/perf/perf_tsdf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ struct SemisphereScene : Scene
Range range(0, frame.rows);
parallel_for_(range, RenderInvoker<SemisphereScene>(frame, pose, reproj, depthFactor, onlySemisphere));

return std::move(frame);
return frame;
}

std::vector<Affine3f> getPoses() override
Expand Down
2 changes: 1 addition & 1 deletion modules/rgbd/test/ocl/test_tsdf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ struct SemisphereScene : Scene
Range range(0, frame.rows);
parallel_for_(range, RenderInvoker<SemisphereScene>(frame, pose, reproj, depthFactor, onlySemisphere));

return std::move(frame);
return frame;
}

std::vector<Affine3f> getPoses() override
Expand Down
8 changes: 4 additions & 4 deletions modules/rgbd/test/test_colored_kinfu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ struct CubeSpheresScene : Scene
Range range(0, frame.rows);
parallel_for_(range, RenderInvoker<CubeSpheresScene>(frame, pose, reproj, depthFactor));

return std::move(frame);
return frame;
}

Mat rgb(Affine3f pose) override
Expand All @@ -217,7 +217,7 @@ struct CubeSpheresScene : Scene
Range range(0, frame.rows);
parallel_for_(range, RenderColorInvoker<CubeSpheresScene>(frame, pose, reproj, depthFactor));

return std::move(frame);
return frame;
}

std::vector<Affine3f> getPoses() override
Expand Down Expand Up @@ -313,7 +313,7 @@ struct RotatingScene : Scene
Range range(0, frame.rows);
parallel_for_(range, RenderInvoker<RotatingScene>(frame, pose, reproj, depthFactor));

return std::move(frame);
return frame;
}

Mat rgb(Affine3f pose) override
Expand All @@ -324,7 +324,7 @@ struct RotatingScene : Scene
Range range(0, frame.rows);
parallel_for_(range, RenderColorInvoker<RotatingScene>(frame, pose, reproj, depthFactor));

return std::move(frame);
return frame;
}

std::vector<Affine3f> getPoses() override
Expand Down
4 changes: 2 additions & 2 deletions modules/rgbd/test/test_kinfu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ struct CubeSpheresScene : Scene
Range range(0, frame.rows);
parallel_for_(range, RenderInvoker<CubeSpheresScene>(frame, pose, reproj, depthFactor));

return std::move(frame);
return frame;
}

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

return std::move(frame);
return frame;
}

std::vector<Affine3f> getPoses() override
Expand Down
2 changes: 1 addition & 1 deletion modules/rgbd/test/test_tsdf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ struct SemisphereScene : Scene
Range range(0, frame.rows);
parallel_for_(range, RenderInvoker<SemisphereScene>(frame, pose, reproj, depthFactor, onlySemisphere));

return std::move(frame);
return frame;
}

std::vector<Affine3f> getPoses() override
Expand Down
16 changes: 8 additions & 8 deletions modules/videostab/src/global_motion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ static Mat normalizePoints(int npoints, Point2f *points)
T(0,0) = T(1,1) = s;
T(0,2) = -cx*s;
T(1,2) = -cy*s;
return std::move(T);
return T;
}


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

return std::move(M);
return M;
}


Expand Down Expand Up @@ -219,7 +219,7 @@ static Mat estimateGlobMotionLeastSquaresRotation(
*rmse = std::sqrt(*rmse / npoints);
}

return std::move(M);
return M;
}

static Mat estimateGlobMotionLeastSquaresRigid(
Expand Down Expand Up @@ -273,7 +273,7 @@ static Mat estimateGlobMotionLeastSquaresRigid(
*rmse = std::sqrt(*rmse / npoints);
}

return std::move(M);
return M;
}


Expand Down Expand Up @@ -484,7 +484,7 @@ Mat estimateGlobalMotionRansac(
if (ninliers)
*ninliers = ninliersMax;

return std::move(bestM);
return bestM;
}


Expand Down Expand Up @@ -527,7 +527,7 @@ Mat MotionEstimatorRansacL2::estimate(InputArray points0, InputArray points1, bo
if (ok) *ok = false;
}

return std::move(M);
return M;
}


Expand Down Expand Up @@ -681,7 +681,7 @@ Mat FromFileMotionReader::estimate(const Mat &/*frame0*/, const Mat &/*frame1*/,
>> M(1,0) >> M(1,1) >> M(1,2)
>> M(2,0) >> M(2,1) >> M(2,2) >> ok_;
if (ok) *ok = ok_;
return std::move(M);
return M;
}


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


Expand Down
8 changes: 4 additions & 4 deletions modules/ximgproc/test/test_sparse_match_interpolator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ Mat readOpticalFlow( const String& path )
Mat_<Point2f> flow;
std::ifstream file(path.c_str(), std::ios_base::binary);
if ( !file.good() )
return std::move(flow); // no file - return empty matrix
return flow; // no file - return empty matrix

float tag;
file.read((char*) &tag, sizeof(float));
if ( tag != FLOW_TAG_FLOAT )
return std::move(flow);
return flow;

int width, height;

Expand All @@ -44,14 +44,14 @@ Mat readOpticalFlow( const String& path )
if ( !file.good() )
{
flow.release();
return std::move(flow);
return flow;
}

flow(i, j) = u;
}
}
file.close();
return std::move(flow);
return flow;
}

CV_ENUM(GuideTypes, CV_8UC1, CV_8UC3)
Expand Down
Loading