foobar2000 SDK  2015-08-03
Functions
metadb_handle_list.cpp File Reference

Go to the source code of this file.

Functions

template<int direction>
static int _cdecl _custom_sort_compare (const void *v1, const void *v2)
 
template<int direction>
static int custom_sort_compare (const custom_sort_data &elem1, const custom_sort_data &elem2)
 

Function Documentation

template<int direction>
static int _cdecl _custom_sort_compare ( const void *  v1,
const void *  v2 
)
static

Definition at line 28 of file metadb_handle_list.cpp.

28  {
29  return custom_sort_compare<direction>(*reinterpret_cast<const custom_sort_data*>(v1),*reinterpret_cast<const custom_sort_data*>(v2));
30 }
template<int direction>
static int custom_sort_compare ( const custom_sort_data &  elem1,
const custom_sort_data &  elem2 
)
static

Definition at line 20 of file metadb_handle_list.cpp.

20  {
21  int ret = direction * StrCmpLogicalW(elem1.text,elem2.text);
22  if (ret == 0) ret = pfc::sgn_t((t_ssize)elem1.index - (t_ssize)elem2.index);
23  return ret;
24 }
int sgn_t(const T &p_val)
Definition: primitives.h:669
pfc::sized_int_t< sizeof(size_t) >::t_signed t_ssize
Definition: int_types.h:49