Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2011-10-21 04:48:02 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-10-21 04:48:02 +0400
commit2d8189cec0dab3d4c9db95c03ebb4eb2de6738c4 (patch)
tree71dcdc794d4446f7243d5c47ecd0290ed568566f /source/blender/blenlib/intern
parent2e549e0241164baff7ba2d73aa05f4d865e20153 (diff)
- minor edits to font drawing/utf8, was needlessly casting int/unsigned int.
- also ifdef'd out more smoke function when the modifiers disabled.
Diffstat (limited to 'source/blender/blenlib/intern')
-rw-r--r--source/blender/blenlib/intern/string_utf8.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/blenlib/intern/string_utf8.c b/source/blender/blenlib/intern/string_utf8.c
index 7dc2b2bcc52..25a0e67fd38 100644
--- a/source/blender/blenlib/intern/string_utf8.c
+++ b/source/blender/blenlib/intern/string_utf8.c
@@ -246,7 +246,7 @@ size_t BLI_strncpy_wchar_from_utf8(wchar_t *dst_w, const char *src_c, const size
while(*src_c && len < maxcpy) {
size_t step= 0;
unsigned int unicode= BLI_str_utf8_as_unicode_and_size(src_c, &step);
- if (unicode != (unsigned int)-1) {
+ if (unicode != BLI_UTF8_ERR) {
*dst_w= (wchar_t)unicode;
src_c += step;
}
@@ -331,7 +331,7 @@ unsigned int BLI_str_utf8_as_unicode(const char *p)
UTF8_COMPUTE (c, mask, len);
if (len == -1)
- return (unsigned int)-1;
+ return BLI_UTF8_ERR;
UTF8_GET (result, p, i, mask, len);
return result;
@@ -346,7 +346,7 @@ unsigned int BLI_str_utf8_as_unicode_and_size(const char *p, size_t *index)
UTF8_COMPUTE (c, mask, len);
if (len == -1)
- return (unsigned int)-1;
+ return BLI_UTF8_ERR;
UTF8_GET (result, p, i, mask, len);
*index += len;
return result;
@@ -370,7 +370,7 @@ unsigned int BLI_str_utf8_as_unicode_step(const char *p, size_t *index)
/* will never return the same pointer unless '\0',
* eternal loop is prevented */
*index += (size_t)(p_next - p);
- return (unsigned int)-1;
+ return BLI_UTF8_ERR;
}
UTF8_GET (result, p, i, mask, len);
*index += len;