src/cx/tree.h

changeset 1295
b00c6ae1441a
parent 1214
ee4e33284f0c
equal deleted inserted replaced
1294:30d7ae76c76a 1295:b00c6ae1441a
1186 cx_attr_nodiscard 1186 cx_attr_nodiscard
1187 cx_attr_export 1187 cx_attr_export
1188 size_t cxTreeSubtreeDepth(CxTree *tree, void *subtree_root); 1188 size_t cxTreeSubtreeDepth(CxTree *tree, void *subtree_root);
1189 1189
1190 /** 1190 /**
1191 * Determines the size of the entire tree.
1192 *
1193 * @param tree the tree
1194 * @return the tree size, counting the root as one
1195 */
1196 cx_attr_nonnull
1197 cx_attr_nodiscard
1198 static inline size_t cxTreeSize(CxTree *tree) {
1199 return tree->size;
1200 }
1201
1202 /**
1191 * Determines the depth of the entire tree. 1203 * Determines the depth of the entire tree.
1192 * 1204 *
1193 * @param tree the tree 1205 * @param tree the tree
1194 * @return the tree depth, counting the root as one 1206 * @return the tree depth, counting the root as one
1195 */ 1207 */

mercurial