Skip to content

Commit

Permalink
Remove warning in depth_cloud_mld.cpp (ros-visualization#1021)
Browse files Browse the repository at this point in the history
Signed-off-by: Alejandro Hernández Cordero <ahcorde@gmail.com>
(cherry picked from commit 092e3efef2f907549976ffd101e5ad8100cbea3f)
  • Loading branch information
ahcorde authored and mergify[bot] committed Jul 26, 2023
1 parent edda46c commit 7feaf61
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions rviz_common/src/rviz_common/depth_cloud_mld.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,9 @@ MultiLayerDepth::generatePointCloudSL(
++cloud_data_ptr;
*cloud_data_ptr = depth;
++cloud_data_ptr;
*cloud_data_ptr = *reinterpret_cast<float *>(&color);
float ret;
std::memcpy(&ret, &color, sizeof(float));
*cloud_data_ptr = ret;
++cloud_data_ptr;

++point_count;
Expand Down Expand Up @@ -346,7 +348,9 @@ MultiLayerDepth::generatePointCloudML(
++cloud_data_ptr;
*cloud_data_ptr = depth;
++cloud_data_ptr;
*cloud_data_ptr = *reinterpret_cast<float *>(&color);
float ret;
std::memcpy(&ret, &color, sizeof(float));
*cloud_data_ptr = ret;
++cloud_data_ptr;

++point_count;
Expand Down

0 comments on commit 7feaf61

Please sign in to comment.