foobar2000 SDK  2015-08-03
Namespaces | Functions
file_list_helper.cpp File Reference

Go to the source code of this file.

Namespaces

 file_list_helper
 

Functions

static void file_list_remove_duplicates (pfc::ptr_list_t< char > &out)
 

Function Documentation

static void file_list_remove_duplicates ( pfc::ptr_list_t< char > &  out)
static

Definition at line 7 of file file_list_helper.cpp.

8 {
9  t_size n, m = out.get_count();
11  bit_array_bittable mask(m);
12  t_size duplicates = 0;
13  for(n=1;n<m;n++) {
14  if (!metadb::path_compare(out[n-1],out[n])) {duplicates++;mask.set(n,true);}
15  }
16  if (duplicates>0) {
17  out.free_mask(mask);
18  }
19 }
Generic variable bit_array implementation. Needs to be initialized with requested array size before ...
t_size get_count() const
Definition: list.h:365
void free_mask(const bit_array &p_mask)
Definition: ptr_list.h:15
size_t t_size
Definition: int_types.h:48
static int path_compare(const char *p1, const char *p2)
Definition: metadb.h:245
void sort_t(t_compare p_compare)
Definition: list.h:461