]> git.saurik.com Git - apple/icu.git/blobdiff - icuSources/common/normlzr.cpp
ICU-59180.0.1.tar.gz
[apple/icu.git] / icuSources / common / normlzr.cpp
index b9580537b232ae53909a452c5d31a658314058a9..607660c45f1139b65fbc87405affdfb72410900f 100644 (file)
@@ -1,7 +1,9 @@
+// © 2016 and later: Unicode, Inc. and others.
+// License & terms of use: http://www.unicode.org/copyright.html
 /*
  *************************************************************************
  * COPYRIGHT: 
- * Copyright (c) 1996-2011, International Business Machines Corporation and
+ * Copyright (c) 1996-2012, International Business Machines Corporation and
  * others. All Rights Reserved.
  *************************************************************************
  */
 #include "normalizer2impl.h"
 #include "uprops.h"  // for uniset_getUnicode32Instance()
 
+#if defined(_ARM64_) && defined(move32)
+ // System can define move32 intrinsics, but the char iters define move32 method
+ // using same undef trick in headers, so undef here to re-enable the method.
+#undef move32
+#endif
+
 U_NAMESPACE_BEGIN
 
 UOBJECT_DEFINE_RTTI_IMPLEMENTATION(Normalizer)
@@ -38,7 +46,7 @@ Normalizer::Normalizer(const UnicodeString& str, UNormalizationMode mode) :
     init();
 }
 
-Normalizer::Normalizer(const UChar *str, int32_t length, UNormalizationMode mode) :
+Normalizer::Normalizer(ConstChar16Ptr str, int32_t length, UNormalizationMode mode) :
     UObject(), fFilteredNorm2(NULL), fNorm2(NULL), fUMode(mode), fOptions(0),
     text(new UCharCharacterIterator(str, length)),
     currentIndex(0), nextIndex(0),
@@ -65,8 +73,6 @@ Normalizer::Normalizer(const Normalizer &copy) :
     init();
 }
 
-static const UChar _NUL=0;
-
 void
 Normalizer::init() {
     UErrorCode errorCode=U_ZERO_ERROR;
@@ -435,7 +441,7 @@ Normalizer::setText(const CharacterIterator& newText,
 }
 
 void
-Normalizer::setText(const UChar* newText,
+Normalizer::setText(ConstChar16Ptr newText,
                     int32_t length,
                     UErrorCode &status)
 {