@@ -191,8 +191,7 @@ untyped_component& member(
191191template <typename T = int32_t >
192192untyped_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(
213212template <typename T = uint32_t >
214213untyped_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