From 1d9da0a7cfbc12e76f194d63b9818ed3a503e519 Mon Sep 17 00:00:00 2001 From: frozar Date: Mon, 4 Sep 2017 11:49:33 +0200 Subject: [PATCH] [OCTREE] Review from 'taketwo'. --- .../pcl/octree/impl/octree_iterator.hpp | 2 +- octree/include/pcl/octree/octree_iterator.h | 146 +++++++++--------- 2 files changed, 74 insertions(+), 74 deletions(-) diff --git a/octree/include/pcl/octree/impl/octree_iterator.hpp b/octree/include/pcl/octree/impl/octree_iterator.hpp index f654c681a9d..8c83b96b9a3 100644 --- a/octree/include/pcl/octree/impl/octree_iterator.hpp +++ b/octree/include/pcl/octree/impl/octree_iterator.hpp @@ -317,7 +317,7 @@ namespace pcl OctreeBreadthFirstIterator::reset (); // Set the current_state_ to the right depth - while ( this->current_state_ && ( this->getCurrentOctreeDepth () != depth_ ) ) + while (this->current_state_ && (this->getCurrentOctreeDepth () != depth_)) { ++*this; } diff --git a/octree/include/pcl/octree/octree_iterator.h b/octree/include/pcl/octree/octree_iterator.h index a842f9a203a..f7944d86f66 100644 --- a/octree/include/pcl/octree/octree_iterator.h +++ b/octree/include/pcl/octree/octree_iterator.h @@ -530,81 +530,81 @@ namespace pcl * \ingroup octree * \author Fabien Rozar (fabien.rozar@gmail.com) */ - template - class OctreeBreadthFirstAtDepthIterator : public OctreeBreadthFirstIterator - { - public: - - // public typedefs - using typename OctreeBreadthFirstIterator::BranchNode; - using typename OctreeBreadthFirstIterator::LeafNode; - - /** \brief Empty constructor. - * \param[in] depth_arg Depth level during traversal - */ - explicit - OctreeBreadthFirstAtDepthIterator (unsigned int depth_arg = 0); - - /** \brief Constructor. - * \param[in] octree_arg Octree to be iterated. Initially the iterator is set to its root node. - * \param[in] depth_arg Depth level during traversal - */ - explicit - OctreeBreadthFirstAtDepthIterator (OctreeT* octree_arg, unsigned int depth_arg = 0); - - /** \brief Copy constructor. - * \param[in] octree_arg Octree to be iterated. Initially the iterator is set to its root node. - * \param[in] depth_arg Depth level during traversal - */ - OctreeBreadthFirstAtDepthIterator (const OctreeBreadthFirstAtDepthIterator& iterator); - - virtual - ~OctreeBreadthFirstAtDepthIterator (); - - /** \brief Copy operator. - * \param[in] src the iterator to copy into this - */ - inline OctreeBreadthFirstAtDepthIterator& - operator = (const OctreeBreadthFirstAtDepthIterator& src) - { - OctreeBreadthFirstIterator::operator= (src); - this->depth_ = src.depth_; - return *this; - } - - /** \brief Reset the iterator to the first node at the depth given initially of the octree - */ - void - reset (); - - /** \brief Reset the iterator to the first node at the depth given initially of the octree - */ - void - reset (int depth); - - /** \brief Preincrement operator. - * \note step to next octree node - */ - OctreeBreadthFirstAtDepthIterator& - operator++ (); - - /** \brief postincrement operator. - * \note step to next octree node - */ - inline OctreeBreadthFirstAtDepthIterator - operator++ (int) - { - OctreeBreadthFirstAtDepthIterator tmp = *this; - ++*this; - return (tmp); - } + template + class OctreeBreadthFirstAtDepthIterator : public OctreeBreadthFirstIterator + { + public: + + // public typedefs + using typename OctreeBreadthFirstIterator::BranchNode; + using typename OctreeBreadthFirstIterator::LeafNode; + + /** \brief Empty constructor. + * \param[in] depth_arg Depth level during traversal + */ + explicit + OctreeBreadthFirstAtDepthIterator (unsigned int depth_arg = 0); + + /** \brief Constructor. + * \param[in] octree_arg Octree to be iterated. Initially the iterator is set to its root node. + * \param[in] depth_arg Depth level during traversal + */ + explicit + OctreeBreadthFirstAtDepthIterator (OctreeT* octree_arg, unsigned int depth_arg = 0); + + /** \brief Copy constructor. + * \param[in] octree_arg Octree to be iterated. Initially the iterator is set to its root node. + * \param[in] depth_arg Depth level during traversal + */ + OctreeBreadthFirstAtDepthIterator (const OctreeBreadthFirstAtDepthIterator& iterator); + + virtual + ~OctreeBreadthFirstAtDepthIterator (); + + /** \brief Copy operator. + * \param[in] src the iterator to copy into this + */ + inline OctreeBreadthFirstAtDepthIterator& + operator = (const OctreeBreadthFirstAtDepthIterator& src) + { + OctreeBreadthFirstIterator::operator= (src); + this->depth_ = src.depth_; + return *this; + } + + /** \brief Reset the iterator to the first node at the depth given initially of the octree + */ + void + reset (); + + /** \brief Reset the iterator to the first node at the depth given as parameter + */ + void + reset (int depth); + + /** \brief Preincrement operator. + * \note step to next octree node + */ + OctreeBreadthFirstAtDepthIterator& + operator++ (); + + /** \brief postincrement operator. + * \note step to next octree node + */ + inline OctreeBreadthFirstAtDepthIterator + operator++ (int) + { + OctreeBreadthFirstAtDepthIterator tmp = *this; + ++*this; + return (tmp); + } - protected: - using OctreeBreadthFirstIterator::FIFO_; + protected: + using OctreeBreadthFirstIterator::FIFO_; - /** \brief Given level of the node to be iterated */ - unsigned int depth_; - } ; + /** \brief Given level of the node to be iterated */ + unsigned int depth_; + }; ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** \brief Octree leaf node iterator class