--- a/src/cx/tree.h Mon Apr 14 19:36:43 2025 +0200 +++ b/src/cx/tree.h Mon Apr 14 19:53:20 2025 +0200 @@ -1188,6 +1188,18 @@ size_t cxTreeSubtreeDepth(CxTree *tree, void *subtree_root); /** + * Determines the size of the entire tree. + * + * @param tree the tree + * @return the tree size, counting the root as one + */ +cx_attr_nonnull +cx_attr_nodiscard +static inline size_t cxTreeSize(CxTree *tree) { + return tree->size; +} + +/** * Determines the depth of the entire tree. * * @param tree the tree