ucx/cx/collection.h

changeset 870
e167cf006213
parent 845
f3ab28ed22e5
child 943
9b5948aa5b90
equal deleted inserted replaced
869:6b7a178cff7c 870:e167cf006213
149 * 149 *
150 * @param c a pointer to a struct that contains #CX_COLLECTION_BASE 150 * @param c a pointer to a struct that contains #CX_COLLECTION_BASE
151 * @retval true if the elements are currently sorted wrt. the collection's compare function 151 * @retval true if the elements are currently sorted wrt. the collection's compare function
152 * @retval false if the order of elements is unknown 152 * @retval false if the order of elements is unknown
153 */ 153 */
154 #define cxCollectionSorted(c) ((c)->collection.sorted) 154 #define cxCollectionSorted(c) ((c)->collection.sorted || (c)->collection.size == 0)
155 155
156 /** 156 /**
157 * Sets a simple destructor function for this collection. 157 * Sets a simple destructor function for this collection.
158 * 158 *
159 * @param c a pointer to a struct that contains #CX_COLLECTION_BASE 159 * @param c a pointer to a struct that contains #CX_COLLECTION_BASE

mercurial