diff options
| -rw-r--r-- | libcmap_find_block.c | 2 | ||||
| -rw-r--r-- | libcmap_find_in_no_block.c | 2 | ||||
| -rw-r--r-- | libcmap_find_script.c | 6 |
3 files changed, 2 insertions, 8 deletions
diff --git a/libcmap_find_block.c b/libcmap_find_block.c index 75c93e5..73071c7 100644 --- a/libcmap_find_block.c +++ b/libcmap_find_block.c @@ -14,7 +14,5 @@ libcmap_find_block(uint32_t codepoint, size_t *offset_out) return &list[i]; } } - if (offset_out) - *offset_out = (size_t)codepoint; return NULL; } diff --git a/libcmap_find_in_no_block.c b/libcmap_find_in_no_block.c index d443ba0..f451453 100644 --- a/libcmap_find_in_no_block.c +++ b/libcmap_find_in_no_block.c @@ -14,7 +14,7 @@ libcmap_find_in_no_block(uint32_t codepoint, size_t *offset_out, size_t *subrang *subrange_out = i; return 1; } - skipped += (size_t)(libcmap_no_block.ranges[i].last - libcmap_no_block.ranges[i].first) + 1U; + skipped += LIBCMAP_RANGE_SIZE(&libcmap_no_block.ranges[i]); } return 0; } diff --git a/libcmap_find_script.c b/libcmap_find_script.c index 844188e..ea39932 100644 --- a/libcmap_find_script.c +++ b/libcmap_find_script.c @@ -18,12 +18,8 @@ libcmap_find_script(uint32_t codepoint, size_t *offset_out, size_t *subrange_out *subrange_out = j; return &list[i]; } - skipped += (size_t)(list[i].ranges[j].last - list[i].ranges[j].first) + 1U; + skipped += LIBCMAP_RANGE_SIZE(&list[i].ranges[j]); } } - if (offset_out) - *offset_out = (size_t)codepoint; - if (subrange_out) - *subrange_out = 0; return NULL; } |
