]> git.saurik.com Git - apple/icu.git/blobdiff - icuSources/test/perf/unisetperf/draft/bitset.cpp
ICU-62123.0.1.tar.gz
[apple/icu.git] / icuSources / test / perf / unisetperf / draft / bitset.cpp
index 487d0c0985ff903bbe20ed3027eb21e6303c5272..e1eb64ee8ab3d098349e58e02a3335fcd8e7a0eb 100644 (file)
@@ -1,10 +1,14 @@
 /*  
 /*  
-**********************************************************************
-*   Copyright (C) 2007, International Business Machines
+*************************************************************************
+*   © 2016 and later: Unicode, Inc. and others.
+*   License & terms of use: http://www.unicode.org/copyright.html#License
+*************************************************************************
+*************************************************************************
+*   Copyright (C) 2014, International Business Machines
 *   Corporation and others.  All Rights Reserved.
 *   Corporation and others.  All Rights Reserved.
-**********************************************************************
+*************************************************************************
 *   file name:  bitset.cpp
 *   file name:  bitset.cpp
-*   encoding:   US-ASCII
+*   encoding:   UTF-8
 *   tab size:   8 (not used)
 *   indentation:4
 *
 *   tab size:   8 (not used)
 *   indentation:4
 *
@@ -20,6 +24,7 @@
 
 #include "unicode/utypes.h"
 #include "unicont.h"
 
 #include "unicode/utypes.h"
 #include "unicont.h"
+#include "cmemory.h" // for UPRV_LENGTHOF
 
 /*
  * Hash table for up to 1k 64-bit words, for 1 bit per BMP code point.
 
 /*
  * Hash table for up to 1k 64-bit words, for 1 bit per BMP code point.
@@ -146,7 +151,7 @@ public:
             prevIndex=j;
         }
 
             prevIndex=j;
         }
 
-        if(bitHash->countKeys()>LENGTHOF(shortBits)) {
+        if(bitHash->countKeys()>UPRV_LENGTHOF(shortBits)) {
             bits=(int64_t *)uprv_malloc(bitHash->countKeys()*8);
         }
         if(bits!=NULL) {
             bits=(int64_t *)uprv_malloc(bitHash->countKeys()*8);
         }
         if(bits!=NULL) {