Пример #1
0
static int __cdecl custom_sort_compare(const custom_sort_data & elem1, const custom_sort_data & elem2 )
{//depends on unicode/ansi, nonportable (win32 lstrcmpi)
	int ret = uSortStringCompare(elem1.text,elem2.text);//uStringCompare
//	if (ret == 0) ret = elem1.subsong - elem2.subsong;
	if (ret == 0) ret = pfc::sgn_t((t_ssize)elem1.index - (t_ssize)elem2.index);
	return ret;
}
Пример #2
0
static int __cdecl custom_sort_compare(const custom_sort_data * &elem1, const custom_sort_data *&elem2 )
{//depends on unicode/ansi shit, nonportable (win32 lstrcmpi)
	return uSortStringCompare(elem1->text,elem2->text);//uStringCompare
}
Пример #3
0
		virtual int compare(const T &elem1, const T &elem2 )
		{
			int temp = uSortStringCompare(elem1->text,elem2->text)*-1;
			if (temp==0) temp = (elem1->index > elem2->index ? 1 : -1); //we could swap -1 and 1 for desc, but then, apart from not making any sense, same sort repeated would yield diff results
			return temp;
		}
Пример #4
0
		virtual int compare(const T& p_item1,const T& p_item2)
		{
			int temp = uSortStringCompare(p_item1->text,p_item2->text);
			if (temp==0) temp = (p_item1->index > p_item2->index ? 1 : -1);
			return temp;
		}