@@ -84,7 +84,8 @@ inline int sizeOfPointField(int datatype)
8484 * @param offset the offset of that element
8585 * @return the offset of the next PointField that will be added to the PointCloud2
8686 */
87- inline int addPointField (sensor_msgs::msg::PointCloud2 & cloud_msg,
87+ inline int addPointField (
88+ sensor_msgs::msg::PointCloud2 & cloud_msg,
8889 const std::string & name, int count, int datatype,
8990 int offset)
9091{
@@ -263,10 +264,9 @@ PointCloud2IteratorBase<T, TT, U, C, V>::PointCloud2IteratorBase()
263264 * @param cloud_msg_ The PointCloud2 to iterate upon
264265 * @param field_name The field to iterate upon
265266 */
266- template <typename T, typename TT, typename U, typename C,
267- template <typename > class V >
268- PointCloud2IteratorBase<T, TT, U, C, V>::PointCloud2IteratorBase(C & cloud_msg,
269- const std::string & field_name)
267+ template <typename T, typename TT, typename U, typename C, template <typename > class V >
268+ PointCloud2IteratorBase<T, TT, U, C, V>::PointCloud2IteratorBase(
269+ C & cloud_msg, const std::string & field_name)
270270{
271271 int offset = set_field (cloud_msg, field_name);
272272
@@ -279,8 +279,7 @@ PointCloud2IteratorBase<T, TT, U, C, V>::PointCloud2IteratorBase(C & cloud_msg,
279279 * @param iter the iterator to copy data from
280280 * @return a reference to *this
281281 */
282- template <typename T, typename TT, typename U, typename C,
283- template <typename > class V >
282+ template <typename T, typename TT, typename U, typename C, template <typename > class V >
284283V<T> & PointCloud2IteratorBase<T, TT, U, C, V>::operator =(const V<T> & iter)
285284{
286285 if (this != &iter) {
@@ -299,8 +298,7 @@ V<T> & PointCloud2IteratorBase<T, TT, U, C, V>::operator=(const V<T> & iter)
299298 * @param i
300299 * @return a reference to the i^th value from the current position
301300 */
302- template <typename T, typename TT, typename U, typename C,
303- template <typename > class V >
301+ template <typename T, typename TT, typename U, typename C, template <typename > class V >
304302TT & PointCloud2IteratorBase<T, TT, U, C, V>::operator [](size_t i) const
305303{
306304 return *(data_ + i);
@@ -309,8 +307,7 @@ TT & PointCloud2IteratorBase<T, TT, U, C, V>::operator[](size_t i) const
309307/* * Dereference the iterator. Equivalent to accessing it through [0]
310308 * @return the value to which the iterator is pointing
311309 */
312- template <typename T, typename TT, typename U, typename C,
313- template <typename > class V >
310+ template <typename T, typename TT, typename U, typename C, template <typename > class V >
314311TT & PointCloud2IteratorBase<T, TT, U, C, V>::operator *() const
315312{
316313 return *data_;
@@ -319,8 +316,7 @@ TT & PointCloud2IteratorBase<T, TT, U, C, V>::operator*() const
319316/* * Increase the iterator to the next element
320317 * @return a reference to the updated iterator
321318 */
322- template <typename T, typename TT, typename U, typename C,
323- template <typename > class V >
319+ template <typename T, typename TT, typename U, typename C, template <typename > class V >
324320V<T> & PointCloud2IteratorBase<T, TT, U, C, V>::operator ++()
325321{
326322 data_char_ += point_step_;
@@ -332,8 +328,7 @@ V<T> & PointCloud2IteratorBase<T, TT, U, C, V>::operator++()
332328 * @param i the amount to increase the iterator by
333329 * @return an iterator with an increased position
334330 */
335- template <typename T, typename TT, typename U, typename C,
336- template <typename > class V >
331+ template <typename T, typename TT, typename U, typename C, template <typename > class V >
337332V<T> PointCloud2IteratorBase<T, TT, U, C, V>::operator +(int i)
338333{
339334 V<T> res = *static_cast <V<T> *>(this );
@@ -347,8 +342,7 @@ V<T> PointCloud2IteratorBase<T, TT, U, C, V>::operator+(int i)
347342/* * Increase the iterator by a certain amount
348343 * @return a reference to the updated iterator
349344 */
350- template <typename T, typename TT, typename U, typename C,
351- template <typename > class V >
345+ template <typename T, typename TT, typename U, typename C, template <typename > class V >
352346V<T> & PointCloud2IteratorBase<T, TT, U, C, V>::operator +=(int i)
353347{
354348 data_char_ += i * point_step_;
@@ -359,8 +353,7 @@ V<T> & PointCloud2IteratorBase<T, TT, U, C, V>::operator+=(int i)
359353/* * Compare to another iterator
360354 * @return whether the current iterator points to a different address than the other one
361355 */
362- template <typename T, typename TT, typename U, typename C,
363- template <typename > class V >
356+ template <typename T, typename TT, typename U, typename C, template <typename > class V >
364357bool PointCloud2IteratorBase<T, TT, U, C, V>::operator !=(const V<T> & iter) const
365358{
366359 return iter.data_ != data_;
@@ -369,8 +362,7 @@ bool PointCloud2IteratorBase<T, TT, U, C, V>::operator!=(const V<T> & iter) cons
369362/* * Return the end iterator
370363 * @return the end iterator (useful when performing normal iterator processing with ++)
371364 */
372- template <typename T, typename TT, typename U, typename C,
373- template <typename > class V >
365+ template <typename T, typename TT, typename U, typename C, template <typename > class V >
374366V<T> PointCloud2IteratorBase<T, TT, U, C, V>::end() const
375367{
376368 V<T> res = *static_cast <const V<T> *>(this );
@@ -383,8 +375,7 @@ V<T> PointCloud2IteratorBase<T, TT, U, C, V>::end() const
383375 * @param field_name the name of the field to iterate upon
384376 * @return the offset at which the field is found
385377 */
386- template <typename T, typename TT, typename U, typename C,
387- template <typename > class V >
378+ template <typename T, typename TT, typename U, typename C, template <typename > class V >
388379int PointCloud2IteratorBase<T, TT, U, C, V>::set_field(
389380 const sensor_msgs::msg::PointCloud2 & cloud_msg, const std::string & field_name)
390381{
0 commit comments