base: use wuffs_base__empty_slice_u8 more often

This commit is contained in:
Nigel Tao committed 2023-11-02 22:43:01 +11:00
1 parent 9a68ec70c6
commit 5407f39386
8 files changed
+28 -28

No files matched your search

+1 -1
View File
@@ -343,7 +343,7 @@ func writeOutParamZeroValue(b *buffer, tm *t.Map, typ *a.TypeExpr) error {
return nil
} else if typ.IsEitherSliceType() {
if inner := typ.Inner(); (inner.Decorator() == 0) && (inner.QID() == t.QID{t.IDBase, t.IDU8}) {
b.writes("wuffs_base__make_slice_u8(NULL, 0)")
b.writes("wuffs_base__empty_slice_u8()")
return nil
}
} else if (typ.Decorator() == 0) && (typ.QID()[0] == t.IDBase) {