Commit aadca860 authored by Jan Möbius's avatar Jan Möbius

Fixed build error on some macs, where protected members were accessed

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@11358 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 52397c0d
......@@ -43,6 +43,7 @@
#define JOINTT_C
#include "JointT.hh"
#include <assert.h>
using namespace std;
......@@ -209,6 +210,8 @@ inline size_t JointT<PointT>::size()
template<typename PointT>
inline JointT<PointT> *JointT<PointT>::child(size_t _index)
{
assert( _index < children_.size() );
if(_index >= children_.size())
return 0;
return children_[_index];
......
......@@ -143,11 +143,11 @@ typename SkeletonT<PointT>::Iterator &SkeletonT<PointT>::Iterator::operator++()
return *this;
// try to make this iterator point to the first child
if(pCurrent_->children_.size() > 0)
if(pCurrent_->size() > 0)
{
// there are children, so add the current joint to the stack and choose the first child as new current position
stJoints_.push(pCurrent_);
pCurrent_ = pCurrent_->children_[0];
pCurrent_ = pCurrent_->child(0);
}else{
if ( pCurrent_->isRoot() ){
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment