forked from mirror/vulkan-zig
Update ref_all_decls.zig
This commit is contained in:
committed by
GitHub
parent
fc700b44c0
commit
a6e228cd9f
@@ -99,13 +99,13 @@ comptime {
|
|||||||
|
|
||||||
fn reallyRefAllDecls(comptime T: type) void {
|
fn reallyRefAllDecls(comptime T: type) void {
|
||||||
switch (@typeInfo(T)) {
|
switch (@typeInfo(T)) {
|
||||||
.@"struct", .@"union" => {
|
.Struct, .Union => {
|
||||||
reallyRefAllContainerDecls(T);
|
reallyRefAllContainerDecls(T);
|
||||||
inline for (std.meta.fields(T)) |field| {
|
inline for (std.meta.fields(T)) |field| {
|
||||||
reallyRefAllDecls(field.type);
|
reallyRefAllDecls(field.type);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
.@"enum", .@"opaque" => {
|
.Enum, .Opaque => {
|
||||||
reallyRefAllContainerDecls(T);
|
reallyRefAllContainerDecls(T);
|
||||||
},
|
},
|
||||||
else => {},
|
else => {},
|
||||||
|
|||||||
Reference in New Issue
Block a user