Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1835)

Unified Diff: source/extra/scrptrun/scrptrun.cpp

Issue 285520043: ticket:12012: Replace all sizeof p / sizeof *p with UPRV_LENGTHOF(). (Closed) Base URL: svn+ssh://source.icu-project.org/repos/icu/icu/trunk
Patch Set: Code review. Created 9 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « source/common/ustring.cpp ('k') | source/extra/scrptrun/srtest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: source/extra/scrptrun/scrptrun.cpp
diff --git a/source/extra/scrptrun/scrptrun.cpp b/source/extra/scrptrun/scrptrun.cpp
index 8d9865155afab8e3a45e240bb2582b9a5872fa96..5b4e5bba928a69dc48f0ce7272580278394ec2b2 100644
--- a/source/extra/scrptrun/scrptrun.cpp
+++ b/source/extra/scrptrun/scrptrun.cpp
@@ -1,7 +1,7 @@
/*
*******************************************************************************
*
- * Copyright (C) 1999-2001, International Business Machines
+ * Copyright (C) 1999-2016, International Business Machines
* Corporation and others. All Rights Reserved.
*
*******************************************************************************
@@ -14,10 +14,9 @@
#include "unicode/utypes.h"
#include "unicode/uscript.h"
+#include "cmemory.h"
#include "scrptrun.h"
-#define ARRAY_SIZE(array) (sizeof array / sizeof array[0])
-
const char ScriptRun::fgClassID=0;
UChar32 ScriptRun::pairedChars[] = {
@@ -40,7 +39,7 @@ UChar32 ScriptRun::pairedChars[] = {
0x301a, 0x301b
};
-const int32_t ScriptRun::pairedCharCount = ARRAY_SIZE(pairedChars);
+const int32_t ScriptRun::pairedCharCount = UPRV_LENGTHOF(pairedChars);
const int32_t ScriptRun::pairedCharPower = 1 << highBit(pairedCharCount);
const int32_t ScriptRun::pairedCharExtra = pairedCharCount - pairedCharPower;
« no previous file with comments | « source/common/ustring.cpp ('k') | source/extra/scrptrun/srtest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b