X-Git-Url: https://git.saurik.com/apple/icu.git/blobdiff_plain/46f4442e9a5a4f3b98b7c1083586332f6a8a99a4..f3c0d7a59d99c2a94c6b8822291f0e42be3773c9:/icuSources/i18n/inputext.cpp diff --git a/icuSources/i18n/inputext.cpp b/icuSources/i18n/inputext.cpp index 7df3df11..2d4f8a38 100644 --- a/icuSources/i18n/inputext.cpp +++ b/icuSources/i18n/inputext.cpp @@ -1,6 +1,8 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html /* ********************************************************************** - * Copyright (C) 2005-2008, International Business Machines + * Copyright (C) 2005-2016, International Business Machines * Corporation and others. All Rights Reserved. ********************************************************************** */ @@ -20,8 +22,6 @@ U_NAMESPACE_BEGIN #define BUFFER_SIZE 8192 -#define ARRAY_SIZE(array) (sizeof array / sizeof array[0]) - #define NEW_ARRAY(type,count) (type *) uprv_malloc((count) * sizeof(type)) #define DELETE_ARRAY(array) uprv_free((void *) (array)) @@ -51,14 +51,14 @@ void InputText::setText(const char *in, int32_t len) fInputLen = 0; fC1Bytes = FALSE; fRawInput = (const uint8_t *) in; - fRawLength = len == -1? uprv_strlen(in) : len; + fRawLength = len == -1? (int32_t)uprv_strlen(in) : len; } void InputText::setDeclaredEncoding(const char* encoding, int32_t len) { if(encoding) { if (len == -1) { - len = uprv_strlen(encoding); + len = (int32_t)uprv_strlen(encoding); } len += 1; // to make place for the \0 at the end.