mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Improve performance of str_utf8_skeleton
Break out of the loop early if possible.
This commit is contained in:
parent
cd3b0ae855
commit
ba8f2feb8b
|
@ -18,6 +18,10 @@ static int str_utf8_skeleton(int ch, const int **skeleton, int *skeleton_len)
|
|||
*skeleton_len = length;
|
||||
return 1;
|
||||
}
|
||||
else if(ch < decomp_chars[i])
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
*skeleton = NULL;
|
||||
*skeleton_len = 1;
|
||||
|
|
Loading…
Reference in a new issue