Skip to content

Commit

Permalink
Handle compilation warning.
Browse files Browse the repository at this point in the history
  • Loading branch information
eupedrosa committed Dec 5, 2020
1 parent 1257fb4 commit a2cffd9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/pf_slam2d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,7 @@ void lama::PFSlam2D::updateParticleMaps(Particle* particle)
Vector3d start = wso;
Vector3d hit = tf * surface->points[i];
Vector3d AB;
double ray_length;
double ray_length = 1.0; // this will be overwritten but gcc fails to notice.
bool mark_hit = true;

// Attempt to truncate the ray if it is larger than the truncated range
Expand Down
2 changes: 1 addition & 1 deletion src/slam2d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ void lama::Slam2D::updateMaps(const PointCloudXYZ::Ptr& surface)
Vector3d start = wso;
Vector3d hit = tf * surface->points[i];
Vector3d AB;
double ray_length;
double ray_length = 1.0; // this will be overwritten but gcc fails to notice.
bool mark_hit = true;

// Attempt to truncate the ray if it is larger than the truncated range
Expand Down

0 comments on commit a2cffd9

Please sign in to comment.