Index: source/test/perf/convperf/convperf.h |
diff --git a/source/test/perf/convperf/convperf.h b/source/test/perf/convperf/convperf.h |
index 994553aa52d829259c7547996a8599957d63f224..c8681c59091ab7a535ff3bcaa33c6d4359eca046 100644 |
--- a/source/test/perf/convperf/convperf.h |
+++ b/source/test/perf/convperf/convperf.h |
@@ -1,6 +1,6 @@ |
/* |
********************************************************************** |
-* Copyright (c) 2002-2005, International Business Machines |
+* Copyright (c) 2002-2014, International Business Machines |
* Corporation and others. All Rights Reserved. |
********************************************************************** |
********************************************************************** |
@@ -14,12 +14,12 @@ |
#include "unicode/ucnv.h" |
#include "unicode/uclean.h" |
#include "unicode/ustring.h" |
+#include "cmemory.h" // for UPRV_LENGTHOF |
#include "unicode/uperf.h" |
#define CONVERSION_FLAGS (0) /*WC_DEFAULTCHAR WC_COMPOSITECHECK & WC_SEPCHARS*/ |
#define MAX_BUF_SIZE 3048 |
-#define LENGTHOF(array) (sizeof(array)/sizeof((array)[0])) |
class ICUToUnicodePerfFunction : public UPerfFunction{ |
private: |
@@ -159,7 +159,7 @@ public: |
name = cpName; |
src = pszIn; |
srcLen = szLen; |
- dstLen = LENGTHOF(dest); |
+ dstLen = UPRV_LENGTHOF(dest); |
unsigned short bEnc[30]={'\0'}; |
const char* tenc=name; |
for(int i=0;*tenc!='\0';i++){ |
@@ -213,7 +213,7 @@ public: |
name = cpName; |
src = pszIn; |
srcLen = szLen; |
- dstLen = LENGTHOF(dest); |
+ dstLen = UPRV_LENGTHOF(dest); |
lpUsedDefaultChar=FALSE; |
unsigned short bEnc[30]={'\0'}; |
const char* tenc=name; |
@@ -308,7 +308,7 @@ public: |
getErr(err,status); |
src = source; |
srcLen = sourceLen; |
- dstLen = LENGTHOF(dst); |
+ dstLen = UPRV_LENGTHOF(dst); |
cpName = name; |
} |
@@ -364,7 +364,7 @@ public: |
getErr(err,status); |
src = source; |
srcLen = sourceLen; |
- dstLen = LENGTHOF(dst); |
+ dstLen = UPRV_LENGTHOF(dst); |
cpName = name; |
} |
@@ -404,7 +404,7 @@ public: |
src = source; |
srcLen = sourceLen; |
- dstLen = LENGTHOF(dst); |
+ dstLen = UPRV_LENGTHOF(dst); |
cpName = name; |
unsigned short bEnc[30]={'\0'}; |
const char* tenc=name; |
@@ -465,7 +465,7 @@ public: |
} |
src = source; |
srcLen = sourceLen; |
- dstLen = LENGTHOF(dst); |
+ dstLen = UPRV_LENGTHOF(dst); |
cpName = name; |
/* get the charset info */ |
MIMECSETINFO mimeInfo; |