]> git.saurik.com Git - apple/icu.git/blobdiff - icuSources/i18n/inputext.cpp
ICU-59117.0.1.tar.gz
[apple/icu.git] / icuSources / i18n / inputext.cpp
index 7df3df11fd6c3108f04e7139eb15c7b547eee0d2..2d4f8a388af6126f69bae095dc84c7158f2b38aa 100644 (file)
@@ -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.