These six methods (indeed three, those that actually throw a warning, are non-constant versions) call C4717 (functions recursive in all ways), but the method following them is not (just like I can tell ... ) What am I missing that causes a warning for them, but not another?
Warning methods:
template<class T>
const QuadTreeNode<T>* QuadTree<T>::GetRoot() const {
return _root;
}
template<class T>
QuadTreeNode<T>* QuadTree<T>::GetRoot() {
return static_cast<const QuadTree<T> >(*this).GetRoot();
}
template<class T>
const int QuadTree<T>::GetNumLevels() const {
return _levels;
}
template<class T>
int QuadTree<T>::GetNumLevels() {
return static_cast<const QuadTree<T> >(*this).GetNumLevels();
}
template<class T>
const bool QuadTree<T>::IsEmpty() const {
return _root == NULL;
}
template<class T>
bool QuadTree<T>::IsEmpty() {
return static_cast<const QuadTree<T> >(*this).IsEmpty();
}
No warning method:
template<class T>
const Rectangle QuadTreeNode<T>::GetNodeDimensions() const {
return _node_bounds;
}
template<class T>
Rectangle QuadTreeNode<T>::GetNodeDimensions() {
return static_cast<const QuadTreeNode<T> >(*this).GetNodeDimensions();
}
Casey source
share