Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.

Commit 0c867b7

Browse files
Monte Gouldingmontegoulding
authored andcommitted
Use CODEPOINT_NONE instead of assigning negatives to unsigned
1 parent 9a556d0 commit 0c867b7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

engine/src/block.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -756,12 +756,12 @@ bool MCBlock::fit(coord_t x, coord_t maxwidth, findex_t& r_break_index, bool& r_
756756
if (t_next_block != parent -> getblocks())
757757
{
758758
if (t_next_block -> GetLength() == 0)
759-
t_next_block_char = -2;
759+
t_next_block_char = CODEPOINT_NONE-1;
760760
else
761761
t_next_block_char = parent->GetCodepointAtIndex(t_next_block -> m_index);
762762
}
763763
else
764-
t_next_block_char = -1;
764+
t_next_block_char = CODEPOINT_NONE;
765765

766766
// FG-2013-10-21 [[ Field speedups ]]
767767
// Previously, we used to calculate the length of the entire block here in order
@@ -836,7 +836,7 @@ bool MCBlock::fit(coord_t x, coord_t maxwidth, findex_t& r_break_index, bool& r_
836836
t_end_of_block = true;
837837
}
838838

839-
if (t_next_char == -1 ||
839+
if (t_next_char == CODEPOINT_NONE ||
840840
MCUnicodeCanBreakBetween(t_this_char, t_next_char))
841841
{
842842
t_can_break = true;

0 commit comments

Comments
 (0)