Случайное дерево объектов
This commit is contained in:
@@ -97,7 +97,7 @@ pub fn createLine(allocator: std.mem.Allocator) !Object {
|
||||
pub fn createBrokenLine(allocator: std.mem.Allocator) !Object {
|
||||
var obj = try createWithCommonProperties(allocator, .broken);
|
||||
errdefer obj.deinit(allocator);
|
||||
var points = std.ArrayList(Point2).init(allocator);
|
||||
var points = std.ArrayList(Point2).empty;
|
||||
try points.appendSlice(allocator, &.{
|
||||
.{ .x = 0, .y = 0 },
|
||||
.{ .x = 80, .y = 0 },
|
||||
|
||||
Reference in New Issue
Block a user