mirror of
https://github.com/samsonjs/media.git
synced 2026-04-27 15:07:40 +00:00
Simplify boolean ternary statements in SsaStyle
PiperOrigin-RevId: 370902227
This commit is contained in:
parent
f56c1a1253
commit
df25cefd7a
1 changed files with 4 additions and 8 deletions
|
|
@ -142,17 +142,13 @@ import java.util.regex.Pattern;
|
||||||
? parseFontSize(styleValues[format.fontSizeIndex].trim())
|
? parseFontSize(styleValues[format.fontSizeIndex].trim())
|
||||||
: Cue.DIMEN_UNSET,
|
: Cue.DIMEN_UNSET,
|
||||||
format.boldIndex != C.INDEX_UNSET
|
format.boldIndex != C.INDEX_UNSET
|
||||||
? parseBooleanValue(styleValues[format.boldIndex].trim())
|
&& parseBooleanValue(styleValues[format.boldIndex].trim()),
|
||||||
: false,
|
|
||||||
format.italicIndex != C.INDEX_UNSET
|
format.italicIndex != C.INDEX_UNSET
|
||||||
? parseBooleanValue(styleValues[format.italicIndex].trim())
|
&& parseBooleanValue(styleValues[format.italicIndex].trim()),
|
||||||
: false,
|
|
||||||
format.underlineIndex != C.INDEX_UNSET
|
format.underlineIndex != C.INDEX_UNSET
|
||||||
? parseBooleanValue(styleValues[format.underlineIndex].trim())
|
&& parseBooleanValue(styleValues[format.underlineIndex].trim()),
|
||||||
: false,
|
|
||||||
format.strikeoutIndex != C.INDEX_UNSET
|
format.strikeoutIndex != C.INDEX_UNSET
|
||||||
? parseBooleanValue(styleValues[format.strikeoutIndex].trim())
|
&& parseBooleanValue(styleValues[format.strikeoutIndex].trim()));
|
||||||
: false);
|
|
||||||
} catch (RuntimeException e) {
|
} catch (RuntimeException e) {
|
||||||
Log.w(TAG, "Skipping malformed 'Style:' line: '" + styleLine + "'", e);
|
Log.w(TAG, "Skipping malformed 'Style:' line: '" + styleLine + "'", e);
|
||||||
return null;
|
return null;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue