Well, you would find empty() implementations like

/**
 * \brief Empty the tree and delete all the element.
 *
 * Resets the tree to its initial state.
 */
template <AVLMEL_TEMPDEF> void AvlTree<AVLMEL_TEMPUSE>::empty()
{
    if ( root ) {
        /* Recursively delete from the tree structure. */
        deleteChildrenOf(root);
        delete root;
        root = 0;
        treeSize = 0;

#ifdef WALKABLE
        BASELIST::abandon();
#endif
 }

What is called empty() here, is called erase() in other places. I would assume that cppcheck applies the rules for the STL libs, but this is misleading here. It's basically the author's choice.

jg

_______________________________________________
ragel-users mailing list
ragel-users@complang.org
http://www.complang.org/mailman/listinfo/ragel-users

Reply via email to