Take comments into account

This commit is contained in:
Philippe Antoine
2021-05-04 14:57:53 +02:00
parent 24bfbcfeca
commit 39e6a58659
2 changed files with 11 additions and 6 deletions
+9 -6
View File
@@ -2822,8 +2822,9 @@ static const struct case_conversion_entry case_conversion_data[] =
codepoint_t ucd_toupper(codepoint_t c)
{
int begin = 0;
int end = sizeof(case_conversion_data)/sizeof(case_conversion_data[0]);
while (begin <= end)
int size = sizeof(case_conversion_data)/sizeof(case_conversion_data[0]);
int end = size;
while (begin <= end && (begin + end) / 2 < size)
{
int pos = (begin + end) / 2;
const struct case_conversion_entry *item = (case_conversion_data + pos);
@@ -2840,8 +2841,9 @@ codepoint_t ucd_toupper(codepoint_t c)
codepoint_t ucd_tolower(codepoint_t c)
{
int begin = 0;
int end = sizeof(case_conversion_data)/sizeof(case_conversion_data[0]);
while (begin < end)
int size = sizeof(case_conversion_data)/sizeof(case_conversion_data[0]);
int end = size;
while (begin <= end && (begin + end) / 2 < size)
{
int pos = (begin + end) / 2;
const struct case_conversion_entry *item = (case_conversion_data + pos);
@@ -2858,8 +2860,9 @@ codepoint_t ucd_tolower(codepoint_t c)
codepoint_t ucd_totitle(codepoint_t c)
{
int begin = 0;
int end = sizeof(case_conversion_data)/sizeof(case_conversion_data[0]);
while (begin <= end)
int size = sizeof(case_conversion_data)/sizeof(case_conversion_data[0]);
int end = size;
while (begin <= end && (begin + end) / 2 < size)
{
int pos = (begin + end) / 2;
const struct case_conversion_entry *item = (case_conversion_data + pos);