src/cx/collection.h

changeset 1427
943bfd9e7978
parent 1424
563033aa998c
equal deleted inserted replaced
1426:3a89b31f0724 1427:943bfd9e7978
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