Skip to content

Commit

Permalink
(minor) Set 'const' and follow Seungjae's writing style
Browse files Browse the repository at this point in the history
  • Loading branch information
LimHyungTae committed Oct 12, 2024
1 parent ec4633c commit 6477b5a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions cpp/patchworkpp/src/patchworkpp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ using namespace patchwork;

bool point_z_cmp(PointXYZ a, PointXYZ b) { return a.z < b.z; }

Eigen::MatrixX3f PatchWorkpp::toEigenCloud(vector<PointXYZ> cloud)
{
Eigen::MatrixX3f PatchWorkpp::toEigenCloud(const vector<PointXYZ> &cloud) {

Eigen::MatrixX3f dst(cloud.size(), 3);
int j=0;
for (auto &p: cloud) {
Expand All @@ -15,8 +15,8 @@ Eigen::MatrixX3f PatchWorkpp::toEigenCloud(vector<PointXYZ> cloud)
return dst;
}

Eigen::VectorXi PatchWorkpp::toIndices(vector<PointXYZ> cloud)
{
Eigen::VectorXi PatchWorkpp::toIndices(const vector<PointXYZ> &cloud) {

Eigen::VectorXi dst(cloud.size());
int j = 0;
for (auto &p: cloud) {
Expand All @@ -25,8 +25,8 @@ Eigen::VectorXi PatchWorkpp::toIndices(vector<PointXYZ> cloud)
return dst;
}

void PatchWorkpp::addCloud(vector<PointXYZ> &cloud, vector<PointXYZ> &add)
{
void PatchWorkpp::addCloud(vector<PointXYZ> &cloud, vector<PointXYZ> &add) {

cloud.insert(cloud.end(), add.begin(), add.end());
}

Expand Down

0 comments on commit 6477b5a

Please sign in to comment.