| 348 | |
| 349 | |
| 350 | LIST * list_unique( LIST * sorted_list ) |
| 351 | { |
| 352 | LIST * result = L0; |
| 353 | OBJECT * last_added = 0; |
| 354 | |
| 355 | LISTITER iter = list_begin( sorted_list ), end = list_end( sorted_list ); |
| 356 | for ( ; iter != end; iter = list_next( iter ) ) |
| 357 | { |
| 358 | if ( !last_added || !object_equal( list_item( iter ), last_added ) ) |
| 359 | { |
| 360 | result = list_push_back( result, object_copy( list_item( iter ) ) ); |
| 361 | last_added = list_item( iter ); |
| 362 | } |
| 363 | } |
| 364 | return result; |
| 365 | } |
| 366 | |
| 367 | void list_done() |
| 368 | { |
no test coverage detected