ws-cleanup-types: archive, audio, data, font, image, layered, music, playlist, subtitle, vector, video: annotations, casts, one value per re-assignment where the solver loses the type

This commit is contained in:
4DBug committed 2026-10-31 11:00:25 -05:00
1 parent dc98aec2ec
commit f459b2dcdf
44 files changed
+172 -119

No files matched your search

+12 -5
View File
@@ -150,9 +150,11 @@ local function glyf(b: buffer, p: number, n: number, maxBytes: number): (any?, s
fl = band(fl, 0x7F)
local dx, dy
if fl < 10 then
dx, dy = 0, withSign(fl, band(fl, 14) * 128 + su8(glyphS))
dx = 0
dy = withSign(fl, band(fl, 14) * 128 + su8(glyphS))
elseif fl < 20 then
dx, dy = withSign(fl, band(fl - 10, 14) * 128 + su8(glyphS)), 0
dx = withSign(fl, band(fl - 10, 14) * 128 + su8(glyphS))
dy = 0
elseif fl < 84 then
local b0 = fl - 20
local b1 = su8(glyphS)
@@ -181,12 +183,17 @@ local function glyf(b: buffer, p: number, n: number, maxBytes: number): (any?, s
end
local x0, y0, x1, y1
if hasBox(g) then
x0, y0, x1, y1 = si16(bboxS), si16(bboxS), si16(bboxS), si16(bboxS)
x0 = si16(bboxS)
y0 = si16(bboxS)
x1 = si16(bboxS)
y1 = si16(bboxS)
else
x0, y0, x1, y1 = 32767, 32767, -32768, -32768
for k = 1, total do
x0, y0 = math.min(x0, xs[k]), math.min(y0, ys[k])
x1, y1 = math.max(x1, xs[k]), math.max(y1, ys[k])
x0 = math.min(x0, xs[k])
y0 = math.min(y0, ys[k])
x1 = math.max(x1, xs[k])
y1 = math.max(y1, ys[k])
end
if total == 0 then
x0, y0, x1, y1 = 0, 0, 0, 0