From e3627fda0c57f8456174f4b79505e54dd4501e35 Mon Sep 17 00:00:00 2001 From: copygirl Date: Mon, 28 Aug 2023 21:00:32 +0200 Subject: [PATCH] Remove some duplicate code --- src/entity.zig | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/src/entity.zig b/src/entity.zig index 65ce402..2fb3123 100644 --- a/src/entity.zig +++ b/src/entity.zig @@ -68,19 +68,6 @@ pub fn Entity(comptime ctx: anytype) type { inline for (add, 0..) |a, i| desc.add[i] = util.anyToId(ctx, a); - switch (@typeInfo(@TypeOf(add))) { - .Struct => |s| { - if (s.is_tuple) { - if (s.fields.len > c.FLECS_ID_DESC_MAX) - @compileError("Adding more than FLECS_ID_DESC_MAX ids"); - inline for (add, 0..) |a, i| - desc.add[i] = util.anyToId(ctx, a); - } else if (s.fields.len > 0) - @compileError("Expected tuple or empty struct, got '" ++ @typeName(@TypeOf(add)) ++ "'"); - }, - else => @compileError("Expected tuple or empty struct, got '" ++ @typeName(@TypeOf(add)) ++ "'"), - } - const result = c.ecs_entity_init(world.raw, &desc); return Self.fromRaw(world, result); }