Give the Type 3 widths warning a flag in the decoded image cache's warning set

Patch 90 adds InterpreterWarning::Type3WidthsMissing and patch 91 matches every warning to a flag, so the merged match needs the new variant.
This commit is contained in:
bflatastic committed 2026-11-09 08:15:43 +07:00
1 parent e2f65dbf5a
commit e49055053f
1 file changed
+2
+2
View File
@@ -141,6 +141,7 @@ fn warning_bit(warning: InterpreterWarning) -> u8 {
InterpreterWarning::ImageDecodeFailure => 2,
InterpreterWarning::ContentTruncated => 4,
InterpreterWarning::ColorFallback => 8,
InterpreterWarning::Type3WidthsMissing => 16,
}
}
@@ -151,6 +152,7 @@ fn warnings_in(bits: u8) -> impl Iterator<Item = InterpreterWarning> {
InterpreterWarning::ImageDecodeFailure,
InterpreterWarning::ContentTruncated,
InterpreterWarning::ColorFallback,
InterpreterWarning::Type3WidthsMissing,
]
.into_iter()
.filter(move |warning| bits & warning_bit(*warning) != 0)