Improve performance of str_utf8_skeleton

Break out of the loop early if possible.
This commit is contained in:
heinrich5991 2016-11-07 21:42:19 +01:00
parent cd3b0ae855
commit ba8f2feb8b

View file

@ -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;