Remove virtual inheritance
AFAIK virtual base classes are only necessary in the context of multiple inheritance (see https://isocpp.org/wiki/faq/multiple-inheritance#virtual-inheritance-where).
Making IVehicle
, IPedestrian
, and IStaticObject
inherit virtually from IEntity
, which only make sense if we would like to communicate that the following Entity is possible - or actually what a user should do at the implementation side:
class ObstacleThingy : public IVehicle, public IStaticObject
{
...
};
I personally prefer composition over inheritance, so unless there are some objections, I'd prefer to remove the virtual relation.