diff --git a/source/RobotAPI/components/ArViz/Client/Client.h b/source/RobotAPI/components/ArViz/Client/Client.h index f2d406fece5753b91d89cc56f26c824711efde62..84dcad9ce36dc40c34553afb085aa3cdd1925460 100644 --- a/source/RobotAPI/components/ArViz/Client/Client.h +++ b/source/RobotAPI/components/ArViz/Client/Client.h @@ -80,8 +80,8 @@ namespace viz InteractionFeedbackRange interactions() const { - InteractionFeedback* begin = (InteractionFeedback*) data_.interactions.data(); - InteractionFeedback* end = begin + data_.interactions.size(); + const InteractionFeedback* begin = reinterpret_cast<const InteractionFeedback*>(data_.interactions.data()); + const InteractionFeedback* end = begin + data_.interactions.size(); return InteractionFeedbackRange{begin, end}; } diff --git a/source/RobotAPI/components/ArViz/Client/elements/PointCloud.h b/source/RobotAPI/components/ArViz/Client/elements/PointCloud.h index a77f79632d3f29955f46773d0aea5c5602dfd0f9..78591128d2daddab633ef3fd04139a4c46ba2340 100644 --- a/source/RobotAPI/components/ArViz/Client/elements/PointCloud.h +++ b/source/RobotAPI/components/ArViz/Client/elements/PointCloud.h @@ -71,8 +71,8 @@ namespace armarx::viz PointCloud& points(std::vector<ColoredPoint> const& ps) { std::size_t memorySize = ps.size() * sizeof(ps[0]); - Ice::Byte* begin = (Ice::Byte*)ps.data(); - Ice::Byte* end = begin + memorySize; + const Ice::Byte* const begin = reinterpret_cast<const Ice::Byte*>(ps.data()); + const Ice::Byte* const end = begin + memorySize; data_->points.assign(begin, end); return *this; } @@ -92,8 +92,8 @@ namespace armarx::viz PointCloud& addPointUnchecked(ColoredPoint const& p) { - Ice::Byte* begin = (Ice::Byte*)&p; - Ice::Byte* end = begin + sizeof(p); + const Ice::Byte* const begin = reinterpret_cast<const Ice::Byte*>(&p); + const Ice::Byte* const end = begin + sizeof(p); data_->points.insert(data_->points.end(), begin, end); return *this; } @@ -391,5 +391,3 @@ namespace armarx::viz }; } - -