Убраны лишние комментарии

This commit is contained in:
2026-02-25 22:46:45 +03:00
parent 317ebb958b
commit 65ca468bfb
19 changed files with 41 additions and 52 deletions

View File

@@ -11,7 +11,7 @@ const arc = @import("arc.zig");
pub const Rect = basic_models.Rectf;
/// Создаёт объект с общими свойствами по умолчанию и специфичными для типа фигуры.
/// Создаёт объект с дефолтными общими и фигурными свойствами.
pub fn createObject(allocator: std.mem.Allocator, shape_kind: Object.ShapeKind) !Object {
var obj = try createWithCommonProperties(allocator, shape_kind);
errdefer obj.deinit(allocator);
@@ -35,7 +35,7 @@ fn createWithCommonProperties(allocator: std.mem.Allocator, shape_kind: Object.S
};
}
/// Проверяет, что объект имеет ожидаемый тип и все требуемые для этого типа свойства.
/// Проверяет тип объекта и наличие обязательных свойств.
pub fn ensure(obj: *const Object, expected_kind: Object.ShapeKind) !void {
if (obj.shape != expected_kind) return error.WrongShapeKind;
const tags = requiredTagsFor(expected_kind);
@@ -53,7 +53,7 @@ fn requiredTagsFor(kind: Object.ShapeKind) []const std.meta.Tag(PropertyData) {
};
}
/// Локальные границы объекта (AABB в своих координатах).
/// Локальные границы (AABB).
pub fn getLocalBounds(obj: *const Object) !Rect {
return switch (obj.shape) {
.line => line.getLocalBounds(obj),