Skip to content

Commit a760333

Browse files
authored
Update untyped_component.inl
1 parent fa0a688 commit a760333

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

include/flecs/addons/cpp/mixins/meta/untyped_component.inl

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -191,8 +191,7 @@ untyped_component& member(
191191
template <typename T = int32_t>
192192
untyped_component& constant(
193193
const char *name,
194-
T value,
195-
flecs::entity_t TId = flecs::I32)
194+
T value)
196195
{
197196
ecs_add_id(world_, id_, _::type<flecs::Enum>::id(world_));
198197

@@ -203,7 +202,7 @@ untyped_component& constant(
203202
ecs_assert(eid != 0, ECS_INTERNAL_ERROR, NULL);
204203

205204
ecs_set_id(world_, eid,
206-
ecs_pair(flecs::Constant, TId), sizeof(T),
205+
ecs_pair(flecs::Constant, flecs::_::type<T>::id(world)), sizeof(T),
207206
&value);
208207

209208
return *this;
@@ -213,8 +212,7 @@ untyped_component& constant(
213212
template <typename T = uint32_t>
214213
untyped_component& bit(
215214
const char *name,
216-
uint32_t value,
217-
flecs::entity_t TId = flecs::U32)
215+
uint32_t value)
218216
{
219217
ecs_add_id(world_, id_, _::type<flecs::Bitmask>::id(world_));
220218

@@ -225,7 +223,7 @@ untyped_component& bit(
225223
ecs_assert(eid != 0, ECS_INTERNAL_ERROR, NULL);
226224

227225
ecs_set_id(world_, eid,
228-
ecs_pair(flecs::Constant, TId), sizeof(T),
226+
ecs_pair(flecs::Constant, flecs::_::type<T>::id(world)), sizeof(T),
229227
&value);
230228

231229
return *this;

0 commit comments

Comments
 (0)