Pcl: [common] Add member functions cbegin() and cend() for accessing const_iterator in PointCloud

Created on 23 Apr 2020  路  1Comment  路  Source: PointCloudLibrary/pcl

Add member functions cbegin() and cend() to return const_iterator for pointclouds.
Currently to use const_iterator it has to be explicitly declared and you cannot use auto.

Expected behavior

for (auto it = cloud.cbegin(); it != cloud.cend(); ++it ) { .. }

Current Behavior

for (PointCloud<PointXYZ>::const_iterator it = cloud.cbegin(); it != cloud.cend(); ++it ) { .. }

or

for (auto it = cloud.points.cbegin(); it != cloud.points.cend(); ++it ) { .. }
low request common

Most helpful comment

It might be better to have PointCloud conform to requirements of a ReversibleContainer

>All comments

It might be better to have PointCloud conform to requirements of a ReversibleContainer

Was this page helpful?
0 / 5 - 0 ratings