forked from mirror/vulkan-zig
fix compile errors on stage1
This commit is contained in:
@@ -139,7 +139,7 @@ pub const IdRenderer = struct {
|
||||
self.text_cache.deinit();
|
||||
}
|
||||
|
||||
fn renderSnake(self: *IdRenderer, screaming: bool, id: []const u8, tag: ?[]const u8) !void {
|
||||
fn renderSnake(self: *IdRenderer, comptime screaming: bool, id: []const u8, tag: ?[]const u8) !void {
|
||||
var it = SegmentIterator.init(id);
|
||||
var first = true;
|
||||
const transform = if (screaming) std.ascii.toUpper else std.ascii.toLower;
|
||||
|
||||
@@ -468,12 +468,12 @@ fn parseCommand(allocator: Allocator, elem: *xml.Element) !registry.Declaration
|
||||
const return_type = try allocator.create(registry.TypeInfo);
|
||||
return_type.* = command_decl.decl_type.typedef;
|
||||
|
||||
const success_codes = if (elem.getAttribute("successcodes")) |codes|
|
||||
const success_codes: [][]const u8 = if (elem.getAttribute("successcodes")) |codes|
|
||||
try splitCommaAlloc(allocator, codes)
|
||||
else
|
||||
&[_][]const u8{};
|
||||
|
||||
const error_codes = if (elem.getAttribute("errorcodes")) |codes|
|
||||
const error_codes: [][]const u8 = if (elem.getAttribute("errorcodes")) |codes|
|
||||
try splitCommaAlloc(allocator, codes)
|
||||
else
|
||||
&[_][]const u8{};
|
||||
|
||||
@@ -56,7 +56,8 @@ pub const Element = struct {
|
||||
}
|
||||
|
||||
pub fn findChildByTag(self: Element, tag: []const u8) ?*Element {
|
||||
return self.findChildrenByTag(tag).next();
|
||||
var children = self.findChildrenByTag(tag);
|
||||
return children.next();
|
||||
}
|
||||
|
||||
pub fn findChildrenByTag(self: Element, tag: []const u8) FindChildrenByTagIterator {
|
||||
@@ -435,7 +436,7 @@ fn parseElement(parser: *Parser, alloc: Allocator, comptime kind: ElementKind) !
|
||||
return null;
|
||||
};
|
||||
break :blk tag;
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
var attributes = std.ArrayList(Attribute).init(alloc);
|
||||
@@ -474,7 +475,7 @@ fn parseElement(parser: *Parser, alloc: Allocator, comptime kind: ElementKind) !
|
||||
_ = parser.eatWs();
|
||||
try parser.expect('>');
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
const element = try alloc.create(Element);
|
||||
|
||||
Reference in New Issue
Block a user