]> git.saurik.com Git - apple/icu.git/blobdiff - icuSources/test/perf/collationperf/collperf.cpp
ICU-66108.tar.gz
[apple/icu.git] / icuSources / test / perf / collationperf / collperf.cpp
index 1ce078176178ee80d2c288593729b3c2a2af3a5a..33e3e6c696d2493bc6261c05d4f6a6a349a8dd6b 100644 (file)
@@ -1,8 +1,12 @@
-/********************************************************************
+/***********************************************************************
+ * © 2016 and later: Unicode, Inc. and others.
+ * License & terms of use: http://www.unicode.org/copyright.html#License
+ ***********************************************************************
+ ***********************************************************************
  * COPYRIGHT:
  * Copyright (C) 2001-2012 IBM, Inc.   All Rights Reserved.
  *
- ********************************************************************/
+ ***********************************************************************/
 /********************************************************************************
 *
 * File CALLCOLL.C
@@ -370,7 +374,6 @@ void doKeyGen()
     int  line;
     int  loops = 0;
     int  iLoop;
-    int  t;
     int  len=-1;
 
     // Adjust loop count to compensate for file size.   Should be order n
@@ -388,9 +391,9 @@ void doKeyGen()
                     len = gFileLines[line].len;
                 }
                 for (iLoop=0; iLoop < opt_iLoopCount; iLoop++) {
-                    t=LCMapStringW(gWinLCID, LCMAP_SORTKEY,
+                    LCMapStringW(gWinLCID, LCMAP_SORTKEY,
                         gFileLines[line].name, len,
-                        (unsigned short *)gFileLines[line].winSortKey, 5000);    // TODO  something with length.
+                        (UChar *)gFileLines[line].winSortKey, 5000);    // TODO  something with length.
                 }
             }
         }
@@ -403,7 +406,7 @@ void doKeyGen()
                     len = gFileLines[line].len;
                 }
                 for (iLoop=0; iLoop < opt_iLoopCount; iLoop++) {
-                    t = ucol_getSortKey(gCol, gFileLines[line].name, len, (unsigned char *)gFileLines[line].icuSortKey, 5000);
+                    ucol_getSortKey(gCol, gFileLines[line].name, len, (unsigned char *)gFileLines[line].icuSortKey, 5000);
                 }
             }
         }
@@ -413,7 +416,7 @@ void doKeyGen()
         for (loops=0; loops<adj_loopCount; loops++) {
             for (line=0; line < gNumFileLines; line++) {
                 for (iLoop=0; iLoop < opt_iLoopCount; iLoop++) {
-                t = strxfrm(gFileLines[line].unixSortKey, gFileLines[line].unixName, 5000);
+                    strxfrm(gFileLines[line].unixSortKey, gFileLines[line].unixName, 5000);
                 }
             }
         }
@@ -1633,7 +1636,7 @@ int main(int argc, const char** argv) {
          t=LCMapStringW(gWinLCID, LCMAP_SORTKEY, gFileLines[line].name, -1, buf, sizeof(buf));
          gFileLines[line].winSortKey  = new char[t];
          if (t > (int32_t)sizeof(buf)) {
-             t = LCMapStringW(gWinLCID, LCMAP_SORTKEY, gFileLines[line].name, -1, (unsigned short *)(gFileLines[line].winSortKey), t);
+             t = LCMapStringW(gWinLCID, LCMAP_SORTKEY, gFileLines[line].name, -1, (UChar *)(gFileLines[line].winSortKey), t);
          }
          else
          {