cmd: Reuse common string constants.
This commit is contained in:
parent
8b3d494247
commit
c5a4878f5f
|
@ -2241,9 +2241,8 @@ static int WCMD_compare( const void *a, const void *b )
|
|||
{
|
||||
int r;
|
||||
const WCHAR * const *str_a = a, * const *str_b = b;
|
||||
static const WCHAR eqW[] = {'=','\0'};
|
||||
r = CompareStringW( LOCALE_USER_DEFAULT, NORM_IGNORECASE | SORT_STRINGSORT,
|
||||
*str_a, strcspnW(*str_a, eqW), *str_b, strcspnW(*str_b, eqW) );
|
||||
*str_a, strcspnW(*str_a, equalW), *str_b, strcspnW(*str_b, equalW) );
|
||||
if( r == CSTR_LESS_THAN ) return -1;
|
||||
if( r == CSTR_GREATER_THAN ) return 1;
|
||||
return 0;
|
||||
|
|
Loading…
Reference in New Issue