ICU-7273 minor error checking and visibility cleanup
X-SVN-Rev: 27408
This commit is contained in:
parent
d80b144c19
commit
bdfe251e8c
@ -52,7 +52,11 @@ class NoopNormalizer2 : public Normalizer2 {
|
||||
const UnicodeString &second,
|
||||
UErrorCode &errorCode) const {
|
||||
if(U_SUCCESS(errorCode)) {
|
||||
first.append(second);
|
||||
if(&first!=&second) {
|
||||
first.append(second);
|
||||
} else {
|
||||
errorCode=U_ILLEGAL_ARGUMENT_ERROR;
|
||||
}
|
||||
}
|
||||
return first;
|
||||
}
|
||||
@ -210,6 +214,7 @@ class DecomposeNormalizer2 : public Normalizer2WithImpl {
|
||||
public:
|
||||
DecomposeNormalizer2(const Normalizer2Impl &ni) : Normalizer2WithImpl(ni) {}
|
||||
|
||||
private:
|
||||
virtual void
|
||||
normalize(const UChar *src, const UChar *limit,
|
||||
ReorderingBuffer &buffer, UErrorCode &errorCode) const {
|
||||
@ -239,6 +244,7 @@ public:
|
||||
ComposeNormalizer2(const Normalizer2Impl &ni, UBool fcc) :
|
||||
Normalizer2WithImpl(ni), onlyContiguous(fcc) {}
|
||||
|
||||
private:
|
||||
virtual void
|
||||
normalize(const UChar *src, const UChar *limit,
|
||||
ReorderingBuffer &buffer, UErrorCode &errorCode) const {
|
||||
@ -299,14 +305,15 @@ public:
|
||||
virtual UBool isInert(UChar32 c) const {
|
||||
return impl.hasCompBoundaryAfter(c, onlyContiguous, TRUE);
|
||||
}
|
||||
private:
|
||||
UBool onlyContiguous;
|
||||
|
||||
const UBool onlyContiguous;
|
||||
};
|
||||
|
||||
class FCDNormalizer2 : public Normalizer2WithImpl {
|
||||
public:
|
||||
FCDNormalizer2(const Normalizer2Impl &ni) : Normalizer2WithImpl(ni) {}
|
||||
|
||||
private:
|
||||
virtual void
|
||||
normalize(const UChar *src, const UChar *limit,
|
||||
ReorderingBuffer &buffer, UErrorCode &errorCode) const {
|
||||
|
@ -359,9 +359,9 @@ private:
|
||||
// UBool isCompYesOrMaybe(uint16_t norm16) const {
|
||||
// return norm16<minNoNo || minMaybeYes<=norm16;
|
||||
// }
|
||||
UBool hasZeroCCFromDecompYes(uint16_t norm16) {
|
||||
return norm16<=MIN_NORMAL_MAYBE_YES || norm16==JAMO_VT;
|
||||
}
|
||||
// UBool hasZeroCCFromDecompYes(uint16_t norm16) const {
|
||||
// return norm16<=MIN_NORMAL_MAYBE_YES || norm16==JAMO_VT;
|
||||
// }
|
||||
UBool isDecompYesAndZeroCC(uint16_t norm16) const {
|
||||
return norm16<minYesNo ||
|
||||
norm16==JAMO_VT ||
|
||||
|
@ -219,7 +219,7 @@ u_hasBinaryProperty(UChar32 c, UProperty which) {
|
||||
// needs to release dest's buffer before we look at its contents.
|
||||
ReorderingBuffer buffer(*kcf, dest);
|
||||
// Small destCapacity for NFKC_CF(c).
|
||||
if(U_SUCCESS(errorCode) && buffer.init(5, errorCode)) {
|
||||
if(buffer.init(5, errorCode)) {
|
||||
const UChar *srcArray=src.getBuffer();
|
||||
kcf->compose(srcArray, srcArray+src.length(), FALSE,
|
||||
TRUE, buffer, errorCode);
|
||||
|
@ -204,7 +204,7 @@ static IntlTest *createLocalPointerTest() {
|
||||
return new LocalPointerTest();
|
||||
}
|
||||
|
||||
void LocalPointerTest::runIndexedTest(int32_t index, UBool exec, const char *&name, char */*par*/) {
|
||||
void LocalPointerTest::runIndexedTest(int32_t index, UBool exec, const char *&name, char * /*par*/) {
|
||||
if(exec) {
|
||||
logln("TestSuite LocalPointerTest: ");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user