Don't use ForeachType as it don't work if foreach type is not copyable. #25
1 changed files with 8 additions and 6 deletions
|
|
@ -465,7 +465,7 @@ export struct EntityManager
|
||||||
static if (isArray!MemberType)
|
static if (isArray!MemberType)
|
||||||
{ // Workaround. This code is never called with: not an array type, but compiler prints an error
|
{ // Workaround. This code is never called with: not an array type, but compiler prints an error
|
||||||
// name = fullyQualifiedName!(Unqual!(ForeachType!MemberType));//.stringof;
|
// name = fullyQualifiedName!(Unqual!(ForeachType!MemberType));//.stringof;
|
||||||
name = fullName!(Unqual!(ForeachType!MemberType));
|
name = fullName!(Unqual!(typeof(MemberType.init[0])));
|
||||||
}
|
}
|
||||||
|
|
||||||
bool is_optional;
|
bool is_optional;
|
||||||
|
|
@ -691,7 +691,7 @@ export struct EntityManager
|
||||||
static if (isArray!MemberType)
|
static if (isArray!MemberType)
|
||||||
{ // Workaround. This code is never called with: not an array type, but compiler prints an error
|
{ // Workaround. This code is never called with: not an array type, but compiler prints an error
|
||||||
// name = fullyQualifiedName!(Unqual!(ForeachType!MemberType));
|
// name = fullyQualifiedName!(Unqual!(ForeachType!MemberType));
|
||||||
name = fullName!(Unqual!(ForeachType!MemberType));
|
name = fullName!(Unqual!(typeof(MemberType.init[0])));
|
||||||
//name = Unqual!(ForeachType!MemberType).stringof;
|
//name = Unqual!(ForeachType!MemberType).stringof;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -899,10 +899,12 @@ export struct EntityManager
|
||||||
static foreach (iii, comp_info; components_info.m_req[0
|
static foreach (iii, comp_info; components_info.m_req[0
|
||||||
.. components_info.m_req_counter])
|
.. components_info.m_req_counter])
|
||||||
{
|
{
|
||||||
__traits(getMember, input_data, comp_info.name) = (cast(ForeachType!(typeof(__traits(getMember,
|
__traits(getMember, input_data, comp_info.name) = (
|
||||||
Sys.EntitiesData, comp_info.name)))*)(
|
cast(typeof(
|
||||||
cast(void*) block + info.deltas[system.m_components[iii]]))[offset
|
(typeof(__traits(getMember, Sys.EntitiesData, comp_info.name))).init[0]
|
||||||
.. entities_count];
|
)*)
|
||||||
|
(cast(void*) block + info.deltas[system.m_components[iii]])
|
||||||
|
)[offset .. entities_count];
|
||||||
}
|
}
|
||||||
|
|
||||||
static foreach (iii, comp_info; components_info.m_optional[0
|
static foreach (iii, comp_info; components_info.m_optional[0
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue