Normalizer::compare(const UnicodeString &s1, const UnicodeString &s2,
uint32_t options,
UErrorCode &errorCode) {
+ const char16_t *p1 = s1.getBuffer();
+ const char16_t *p2 = s2.getBuffer();
+#ifdef U_ALIASING_BARRIER
+ U_ALIASING_BARRIER(p1);
+ U_ALIASING_BARRIER(p2);
+#endif
// all argument checking is done in unorm_compare
- return unorm_compare(s1.getBuffer(), s1.length(),
- s2.getBuffer(), s2.length(),
+ return unorm_compare(reinterpret_cast<const UChar *>(p1), s1.length(),
+ reinterpret_cast<const UChar *>(p2), s2.length(),
options,
&errorCode);
}
#if !UCONFIG_NO_COLLATION
+#include "unicode/chariter.h"
#include "unicode/coleitr.h"
#include "unicode/tblcoll.h"
#include "unicode/ustring.h"
#include "unicode/uobject.h"
#include "unicode/ucol.h"
-#include "unicode/normlzr.h"
+#include "unicode/unorm.h"
#include "unicode/locid.h"
#include "unicode/uniset.h"
#include "unicode/umisc.h"
* @see CollationKey
* @see CollationElementIterator
* @see Locale
-* @see Normalizer
+* @see Normalizer2
* @version 2.0 11/15/01
*/