diff options
author | Campbell Barton <ideasman42@gmail.com> | 2017-10-28 09:48:45 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2017-10-28 09:48:45 +0300 |
commit | 8ac69ff9dcfc6aba8b5de8d53658612c8411b43b (patch) | |
tree | e3297adfe4494190ddb707e62161cdc9a366b737 /source/blender/blenlib/intern/string_cursor_utf8.c | |
parent | 1d409defbf3fd40b9291c4945975cc36e355ddc0 (diff) |
Cleanup: use uint type in BLI
Diffstat (limited to 'source/blender/blenlib/intern/string_cursor_utf8.c')
-rw-r--r-- | source/blender/blenlib/intern/string_cursor_utf8.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/source/blender/blenlib/intern/string_cursor_utf8.c b/source/blender/blenlib/intern/string_cursor_utf8.c index 85e3106dc6e..d293490c846 100644 --- a/source/blender/blenlib/intern/string_cursor_utf8.c +++ b/source/blender/blenlib/intern/string_cursor_utf8.c @@ -51,7 +51,7 @@ typedef enum eStrCursorDelimType { STRCUR_DELIM_OTHER } eStrCursorDelimType; -static eStrCursorDelimType cursor_delim_type_unicode(const unsigned int uch) +static eStrCursorDelimType cursor_delim_type_unicode(const uint uch) { switch (uch) { case ',': @@ -112,7 +112,7 @@ static eStrCursorDelimType cursor_delim_type_utf8(const char *ch_utf8) { /* for full unicode support we really need to have large lookup tables to figure * out whats what in every possible char set - and python, glib both have these. */ - unsigned int uch = BLI_str_utf8_as_unicode(ch_utf8); + uint uch = BLI_str_utf8_as_unicode(ch_utf8); return cursor_delim_type_unicode(uch); } @@ -259,14 +259,14 @@ void BLI_str_cursor_step_wchar( if (jump != STRCUR_JUMP_NONE) { const eStrCursorDelimType delim_type = - (*pos) < maxlen ? cursor_delim_type_unicode((unsigned int)str[*pos]) : STRCUR_DELIM_NONE; + (*pos) < maxlen ? cursor_delim_type_unicode((uint)str[*pos]) : STRCUR_DELIM_NONE; /* jump between special characters (/,\,_,-, etc.), * look at function cursor_delim_type_unicode() for complete * list of special character, ctr -> */ while ((*pos) < maxlen) { if (wchar_t_step_next(str, maxlen, pos)) { if ((jump != STRCUR_JUMP_ALL) && - (delim_type != cursor_delim_type_unicode((unsigned int)str[*pos]))) + (delim_type != cursor_delim_type_unicode((uint)str[*pos]))) { break; } @@ -287,7 +287,7 @@ void BLI_str_cursor_step_wchar( if (jump != STRCUR_JUMP_NONE) { const eStrCursorDelimType delim_type = - (*pos) > 0 ? cursor_delim_type_unicode((unsigned int)str[(*pos) - 1]) : STRCUR_DELIM_NONE; + (*pos) > 0 ? cursor_delim_type_unicode((uint)str[(*pos) - 1]) : STRCUR_DELIM_NONE; /* jump between special characters (/,\,_,-, etc.), * look at function cursor_delim_type() for complete * list of special character, ctr -> */ @@ -295,7 +295,7 @@ void BLI_str_cursor_step_wchar( const int pos_prev = *pos; if (wchar_t_step_prev(str, maxlen, pos)) { if ((jump != STRCUR_JUMP_ALL) && - (delim_type != cursor_delim_type_unicode((unsigned int)str[*pos]))) + (delim_type != cursor_delim_type_unicode((uint)str[*pos]))) { /* left only: compensate for index/change in direction */ if ((pos_orig - (*pos)) >= 1) { @@ -314,4 +314,3 @@ void BLI_str_cursor_step_wchar( BLI_assert(0); } } - |