]> git.saurik.com Git - apple/icu.git/blobdiff - icuSources/test/intltest/colldata.cpp
ICU-57131.0.1.tar.gz
[apple/icu.git] / icuSources / test / intltest / colldata.cpp
index abbfac2c9fd8086674bdd79832c9a466b4000895..79d93654926d40027b1ff811e11e870962390e31 100644 (file)
@@ -1,6 +1,6 @@
 /*
  ******************************************************************************
- *   Copyright (C) 1996-2014, International Business Machines
+ *   Copyright (C) 1996-2016, International Business Machines
  *   Corporation and others.  All Rights Reserved.
  ******************************************************************************
  */
@@ -32,7 +32,6 @@
 
 #include "colldata.h"
 
-#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))
 #define ARRAY_COPY(dst, src, count) uprv_memcpy((void *) (dst), (void *) (src), (count) * sizeof (src)[0])
@@ -58,12 +57,10 @@ CEList::CEList(UCollator *coll, const UnicodeString &string, UErrorCode &status)
     {
     default:
         strengthMask |= UCOL_TERTIARYORDERMASK;
-        /* fall through */
-
+        U_FALLTHROUGH;
     case UCOL_SECONDARY:
         strengthMask |= UCOL_SECONDARYORDERMASK;
-        /* fall through */
-
+        U_FALLTHROUGH;
     case UCOL_PRIMARY:
         strengthMask |= UCOL_PRIMARYORDERMASK;
     }
@@ -428,7 +425,7 @@ bail:
     // Maybe use [:HST=T:] and look for the end of the last range?
     // Maybe use script boundary mappings instead of this code??
     UChar  jamoRanges[] = {Hangul::JAMO_L_BASE, Hangul::JAMO_V_BASE, Hangul::JAMO_T_BASE + 1, 0x11FF};
-     UnicodeString jamoString(FALSE, jamoRanges, ARRAY_SIZE(jamoRanges));
+     UnicodeString jamoString(FALSE, jamoRanges, UPRV_LENGTHOF(jamoRanges));
      CEList hanList(coll, hanString, status);
      CEList jamoList(coll, jamoString, status);
      int32_t j = 0;