Skip to content

Commit

Permalink
face: remove redundant move calls
Browse files Browse the repository at this point in the history
detected by latest gcc.
  • Loading branch information
rurban committed Mar 28, 2024
1 parent ffa53bb commit d4f34fc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
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

0 comments on commit d4f34fc

Please sign in to comment.