summaryrefslogtreecommitdiffstats
path: root/thirdparty/icu4c/common/ucase.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'thirdparty/icu4c/common/ucase.cpp')
-rw-r--r--thirdparty/icu4c/common/ucase.cpp43
1 files changed, 3 insertions, 40 deletions
diff --git a/thirdparty/icu4c/common/ucase.cpp b/thirdparty/icu4c/common/ucase.cpp
index 392e1266ae..4fd23fc935 100644
--- a/thirdparty/icu4c/common/ucase.cpp
+++ b/thirdparty/icu4c/common/ucase.cpp
@@ -317,43 +317,6 @@ ucase_addCaseClosure(UChar32 c, const USetAdder *sa) {
}
}
-namespace {
-
-/**
- * Add the simple case closure mapping,
- * except if there is not actually an scf relationship between the two characters.
- * TODO: Unicode should probably add the corresponding scf mappings.
- * See https://crbug.com/v8/13377 and Unicode-internal PAG issue #23.
- * If & when those scf mappings are added, we should be able to remove all of these exceptions.
- */
-void addOneSimpleCaseClosure(UChar32 c, UChar32 t, const USetAdder *sa) {
- switch (c) {
- case 0x0390:
- if (t == 0x1FD3) { return; }
- break;
- case 0x03B0:
- if (t == 0x1FE3) { return; }
- break;
- case 0x1FD3:
- if (t == 0x0390) { return; }
- break;
- case 0x1FE3:
- if (t == 0x03B0) { return; }
- break;
- case 0xFB05:
- if (t == 0xFB06) { return; }
- break;
- case 0xFB06:
- if (t == 0xFB05) { return; }
- break;
- default:
- break;
- }
- sa->add(sa->set, t);
-}
-
-} // namespace
-
U_CFUNC void U_EXPORT2
ucase_addSimpleCaseClosure(UChar32 c, const USetAdder *sa) {
uint16_t props=UTRIE2_GET16(&ucase_props_singleton.trie, c);
@@ -397,7 +360,7 @@ ucase_addSimpleCaseClosure(UChar32 c, const USetAdder *sa) {
pe=pe0;
UChar32 mapping;
GET_SLOT_VALUE(excWord, idx, pe, mapping);
- addOneSimpleCaseClosure(c, mapping, sa);
+ sa->add(sa->set, mapping);
}
}
if(HAS_SLOT(excWord, UCASE_EXC_DELTA)) {
@@ -405,7 +368,7 @@ ucase_addSimpleCaseClosure(UChar32 c, const USetAdder *sa) {
int32_t delta;
GET_SLOT_VALUE(excWord, UCASE_EXC_DELTA, pe, delta);
UChar32 mapping = (excWord&UCASE_EXC_DELTA_IS_NEGATIVE)==0 ? c+delta : c-delta;
- addOneSimpleCaseClosure(c, mapping, sa);
+ sa->add(sa->set, mapping);
}
/* get the closure string pointer & length */
@@ -448,7 +411,7 @@ ucase_addSimpleCaseClosure(UChar32 c, const USetAdder *sa) {
for(int32_t idx=0; idx<closureLength;) {
UChar32 mapping;
U16_NEXT_UNSAFE(closure, idx, mapping);
- addOneSimpleCaseClosure(c, mapping, sa);
+ sa->add(sa->set, mapping);
}
}
}