Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Parpart <[email protected]>
  • Loading branch information
christianparpart committed Dec 30, 2023
1 parent d05a2db commit 4df5e91
Show file tree
Hide file tree
Showing 6 changed files with 739 additions and 245 deletions.
4 changes: 2 additions & 2 deletions src/libunicode/capi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ int u32_gc_width(u32_char_t const* codepoints, size_t size, int mode)
while (segmenter.codepointsAvailable())
{
auto const cluster = *segmenter;
int thisWidth = unicode::width(cluster.front());
int thisWidth = static_cast<int>(unicode::width(cluster.front()));
if (mode != GC_WIDTH_MODE_NON_MODIFIABLE)
{
for (size_t i = 1; i < size; ++i)
Expand All @@ -60,7 +60,7 @@ int u32_gc_width(u32_char_t const* codepoints, size_t size, int mode)
{
case 0xFE0E: return 1;
case 0xFE0F: return 2;
default: return unicode::width(codepoint);
default: return static_cast<int>(unicode::width(codepoint));
}
}();
if (width && width != thisWidth)
Expand Down
Loading

0 comments on commit 4df5e91

Please sign in to comment.