From 5ce1d4980f1e7b570d6b2f348029582ea0d33b19 Mon Sep 17 00:00:00 2001 From: Arjo Chakravarty Date: Thu, 17 Nov 2022 08:19:43 +0800 Subject: [PATCH] Address compiler warnings. Signed-off-by: Arjo Chakravarty --- .../environment_visualization/EnvironmentVisualization.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/gui/plugins/environment_visualization/EnvironmentVisualization.cc b/src/gui/plugins/environment_visualization/EnvironmentVisualization.cc index fbfe9bfed0..2706e82e6c 100644 --- a/src/gui/plugins/environment_visualization/EnvironmentVisualization.cc +++ b/src/gui/plugins/environment_visualization/EnvironmentVisualization.cc @@ -183,7 +183,8 @@ class EnvironmentVisualizationPrivate {{"xyz", gz::msgs::PointCloudPacked::Field::FLOAT32}}); auto numberOfPoints = ceil(xSamples) * ceil(ySamples) * ceil(zSamples); - std::size_t dataSize{numberOfPoints * pcMsg.point_step()}; + std::size_t dataSize{ + static_cast(numberOfPoints * pcMsg.point_step())}; pcMsg.mutable_data()->resize(dataSize); pcMsg.set_height(1); pcMsg.set_width(numberOfPoints); @@ -279,8 +280,8 @@ void EnvironmentVisualization::Update(const UpdateInfo &_info, { _ecm.EachNew( [this]( - const Entity &_entity, - const components::Environment* environment + const Entity &/*_entity*/, + const components::Environment* /*environment*/ ) { this->dataPtr->resample = true; return true;