Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove scary assumptions #582

Merged
merged 1 commit into from
Oct 24, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1395,29 +1395,17 @@ private static void writeEnumeratedValues(
} else if (defaultBidiValues != null) {
Bidi_Class_Values bidiValue = Bidi_Class_Values.forName(value);
if (defaultBidiValues.containsValue(bidiValue)) {
// We assume that unassigned code points that have this value
// according to the props data also have this value according to the defaults.
// Otherwise we would need to intersect defaultBidiValues.keySet(bidiValue)
// with the unassigned set before removing from s.
s.removeAll(unassigned);
s.removeAll(defaultBidiValues.keySet(bidiValue).retainAll(unassigned));
}
} else if (defaultEaValues != null) {
East_Asian_Width_Values eaValue = East_Asian_Width_Values.forName(value);
if (defaultEaValues.containsValue(eaValue)) {
// We assume that unassigned code points that have this value
// according to the props data also have this value according to the defaults.
// Otherwise we would need to intersect defaultEaValues.keySet(eaValue)
// with the unassigned set before removing from s.
s.removeAll(unassigned);
s.removeAll(defaultEaValues.keySet(eaValue).retainAll(unassigned));
}
} else if (defaultLbValues != null) {
Line_Break_Values lbValue = Line_Break_Values.forName(value);
if (defaultLbValues.containsValue(lbValue)) {
// We assume that unassigned code points that have this value
// according to the props data also have this value according to the defaults.
// Otherwise we would need to intersect defaultEaValues.keySet(eaValue)
// with the unassigned set before removing from s.
s.removeAll(unassigned);
s.removeAll(defaultLbValues.keySet(lbValue).retainAll(unassigned));
}
}

Expand Down
Loading