[hvgl] Minor simplify sanitize

This commit is contained in:
Behdad Esfahbod committed 2025-03-02 16:57:55 -07:00
1 parent 4e56a0b8b5
commit de0e1bddff
1 file changed
+2 -3
+2 -3
View File
@@ -342,15 +342,14 @@ struct PartComposite
if (unlikely (!c->check_struct (this))) return_trace (false);
const auto &subParts = StructAtOffset<SubParts> (this, subPartsOff4 * 4);
if (unlikely (!subParts.sanitize (c, subPartCount))) return_trace (false);
const auto &extremumColumnStarts = StructAtOffset<ExtremumColumnStarts> (this, extremumColumnStartsOff4 * 4);
const auto &masterAxisValueDeltas = StructAtOffset<MasterAxisValueDeltas> (this, masterAxisValueDeltasOff4 * 4);
const auto &extremumAxisValueDeltas = StructAtOffset<ExtremumAxisValueDeltas> (this, extremumAxisValueDeltasOff4 * 4);
const auto &allTranslations = StructAtOffset<AllTranslations> (this, allTranslationsOff4 * 4);
const auto &allRotations = StructAtOffset<AllRotations> (this, allRotationsOff4 * 4);
return_trace (likely (extremumColumnStarts.sanitize (c, axisCount, sparseMasterAxisValueCount, sparseExtremumAxisValueCount) &&
return_trace (likely (subParts.sanitize (c, subPartCount) &&
extremumColumnStarts.sanitize (c, axisCount, sparseMasterAxisValueCount, sparseExtremumAxisValueCount) &&
masterAxisValueDeltas.sanitize (c, sparseMasterAxisValueCount) &&
extremumAxisValueDeltas.sanitize (c, sparseExtremumAxisValueCount) &&
allTranslations.sanitize (c, sparseMasterTranslationCount, sparseExtremumTranslationCount) &&