elvisxzhou / artemisd

A D port of Artemis Entity System Framework

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Implicit conversions.

vuaru opened this issue · comments

Nice work on the port, artemis looks very interesting!

This in world.d (and similar in other places) gives an implicit cast warning.

    T getSystem(T)()
        if( is(T:EntitySystem) )
    {
        return systems[T.TypeId];
    }

An explicit cast would be better (and allow compiling with -w).

    T getSystem(T)()
        if( is(T:EntitySystem) )
    {
        return cast(T)systems[T.TypeId];
    }