Skip to content

Commit 0fd698a

Browse files
mviethlarshg
andauthored
Add more const
Co-authored-by: Lars Glud <larshg@gmail.com>
1 parent 0431171 commit 0fd698a

File tree

7 files changed

+8
-8
lines changed

7 files changed

+8
-8
lines changed

features/include/pcl/features/impl/moment_of_inertia_estimation.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,7 @@ pcl::MomentOfInertiaEstimation<PointT>::computeEigenVectors (const Eigen::Matrix
399399
Eigen::Vector3f& major_axis, Eigen::Vector3f& middle_axis, Eigen::Vector3f& minor_axis, float& major_value,
400400
float& middle_value, float& minor_value)
401401
{
402-
Eigen::SelfAdjointEigenSolver<Eigen::Matrix<float, 3, 3>> eigen_solver(covariance_matrix);
402+
const Eigen::SelfAdjointEigenSolver<Eigen::Matrix<float, 3, 3>> eigen_solver(covariance_matrix);
403403

404404
const Eigen::SelfAdjointEigenSolver <Eigen::Matrix <float, 3, 3> >::EigenvectorsType& eigen_vectors = eigen_solver.eigenvectors ();
405405
const Eigen::SelfAdjointEigenSolver <Eigen::Matrix <float, 3, 3> >::RealVectorType& eigen_values = eigen_solver.eigenvalues ();

features/include/pcl/features/impl/our_cvfh.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ pcl::OURCVFHEstimation<PointInT, PointNT, PointOutT>::sgurf (Eigen::Vector3f & c
260260

261261
scatter /= sum_w;
262262

263-
Eigen::JacobiSVD <Eigen::Matrix3f> svd (scatter, Eigen::ComputeFullV);
263+
const Eigen::JacobiSVD <Eigen::Matrix3f> svd (scatter, Eigen::ComputeFullV);
264264
Eigen::Vector3f evx = svd.matrixV ().col (0);
265265
Eigen::Vector3f evy = svd.matrixV ().col (1);
266266
Eigen::Vector3f evz = svd.matrixV ().col (2);

io/src/dinast_grabber.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ pcl::DinastGrabber::USBRxControlData (const unsigned char req_code,
353353
int length)
354354
{
355355
// The direction of the transfer is inferred from the requesttype field of the setup packet.
356-
unsigned char requesttype = (static_cast<unsigned char>(LIBUSB_RECIPIENT_DEVICE) | static_cast<unsigned char>(LIBUSB_REQUEST_TYPE_VENDOR) | static_cast<unsigned char>(LIBUSB_ENDPOINT_IN));
356+
const unsigned char requesttype = (static_cast<unsigned char>(LIBUSB_RECIPIENT_DEVICE) | static_cast<unsigned char>(LIBUSB_REQUEST_TYPE_VENDOR) | static_cast<unsigned char>(LIBUSB_ENDPOINT_IN));
357357
// The value field for the setup packet
358358
std::uint16_t value = 0x02;
359359
// The index field for the setup packet
@@ -377,7 +377,7 @@ pcl::DinastGrabber::USBTxControlData (const unsigned char req_code,
377377
int length)
378378
{
379379
// The direction of the transfer is inferred from the requesttype field of the setup packet.
380-
unsigned char requesttype = (static_cast<unsigned char>(LIBUSB_RECIPIENT_DEVICE) | static_cast<unsigned char>(LIBUSB_REQUEST_TYPE_VENDOR) | static_cast<unsigned char>(LIBUSB_ENDPOINT_OUT));
380+
const unsigned char requesttype = (static_cast<unsigned char>(LIBUSB_RECIPIENT_DEVICE) | static_cast<unsigned char>(LIBUSB_REQUEST_TYPE_VENDOR) | static_cast<unsigned char>(LIBUSB_ENDPOINT_OUT));
381381
// The value field for the setup packet
382382
std::uint16_t value = 0x01;
383383
// The index field for the setup packet

keypoints/include/pcl/keypoints/impl/iss_3d.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ pcl::ISSKeypoint3D<PointInT, PointOutT, NormalT>::detectKeypoints (PointCloudOut
373373
Eigen::Matrix3d cov_m = Eigen::Matrix3d::Zero ();
374374
getScatterMatrix (static_cast<int> (index), cov_m);
375375

376-
Eigen::SelfAdjointEigenSolver<Eigen::Matrix3d> solver (cov_m, Eigen::EigenvaluesOnly);
376+
const Eigen::SelfAdjointEigenSolver<Eigen::Matrix3d> solver (cov_m, Eigen::EigenvaluesOnly);
377377

378378
const double& e1c = solver.eigenvalues ()[2];
379379
const double& e2c = solver.eigenvalues ()[1];

sample_consensus/include/pcl/sample_consensus/impl/sac_model_ellipse3d.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ pcl::SampleConsensusModelEllipse3D<PointT>::computeModelCoefficients (const Indi
175175
.finished();
176176

177177
// Calculate the eigenvalues and eigenvectors of matrix M
178-
Eigen::SelfAdjointEigenSolver<Eigen::Matrix2f> solver_M(M, Eigen::EigenvaluesOnly);
178+
const Eigen::SelfAdjointEigenSolver<Eigen::Matrix2f> solver_M(M, Eigen::EigenvaluesOnly);
179179

180180
Eigen::Vector2f eigvals_M = solver_M.eigenvalues();
181181

surface/include/pcl/surface/3rdparty/poisson4/octree_poisson.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ namespace pcl
183183
else{
184184
int c = std::numeric_limits<int>::lowest();
185185
for(int i=0;i<Cube::CORNERS;i++){
186-
int d=children[i].maxDepth();
186+
const int d=children[i].maxDepth();
187187
if(d>c){c=d;}
188188
}
189189
return c+1;

visualization/src/point_picking_event.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ pcl::visualization::PointPickingCallback::Execute (vtkObject *caller, unsigned l
6666
if ((eventid == vtkCommand::LeftButtonPressEvent) && (iren->GetShiftKey () > 0))
6767
{
6868
float x = 0, y = 0, z = 0;
69-
auto idx = performSinglePick (iren, x, y, z);
69+
const auto idx = performSinglePick (iren, x, y, z);
7070
// Create a PointPickingEvent if a point was selected
7171
if (idx != pcl::UNAVAILABLE)
7272
{

0 commit comments

Comments
 (0)