src/cx/list.h

changeset 1423
9a72258446cd
parent 1419
e46406fd1b3c
equal deleted inserted replaced
1422:8bfccb342895 1423:9a72258446cd
281 281
282 /** 282 /**
283 * Default implementation of an array insert where only elements are inserted when they don't exist in the list. 283 * Default implementation of an array insert where only elements are inserted when they don't exist in the list.
284 * 284 *
285 * This function is similar to cx_list_default_insert_sorted(), except it skips elements that are already in the list. 285 * This function is similar to cx_list_default_insert_sorted(), except it skips elements that are already in the list.
286 * The @p sorted_data itself must not contain duplicates.
287 * 286 *
288 * @note The return value of this function denotes the number of elements from the @p sorted_data that are definitely 287 * @note The return value of this function denotes the number of elements from the @p sorted_data that are definitely
289 * contained in the list after completing the call. It is @em not the number of elements that were newly inserted. 288 * contained in the list after completing the call. It is @em not the number of elements that were newly inserted.
290 * That means, when no error occurred, the return value should be @p n. 289 * That means, when no error occurred, the return value should be @p n.
291 * 290 *
623 * 622 *
624 * If this list is storing pointers instead of objects @p array is expected to 623 * If this list is storing pointers instead of objects @p array is expected to
625 * be an array of pointers. 624 * be an array of pointers.
626 * 625 *
627 * If the list is not sorted already, the behavior is undefined. 626 * If the list is not sorted already, the behavior is undefined.
628 * This is also the case when the @p array is not sorted or already contains duplicates. 627 * This is also the case when the @p array is not sorted.
629 * 628 *
630 * @param list the list 629 * @param list the list
631 * @param array a pointer to the elements to add 630 * @param array a pointer to the elements to add
632 * @param n the number of elements to add 631 * @param n the number of elements to add
633 * @return the number of added elements 632 * @return the number of added elements

mercurial