]> code.bitgloo.com Git - clyne/entityx.git/commit
Fix a bunch of constness issues (fixes #95).
authorAlec Thomas <alec@swapoff.org>
Fri, 24 Apr 2015 01:47:33 +0000 (11:47 +1000)
committerAlec Thomas <alec@swapoff.org>
Fri, 24 Apr 2015 01:47:33 +0000 (11:47 +1000)
commit29d8c3763c27e5cc18695f8261145c836670efd7
treeafd06bf8135fb3e865037dde8beaac80172fc32e
parent26f02d3e4a8d78d4dbe406748b65da83195ad170
Fix a bunch of constness issues (fixes #95).

- Use SFINAE to prevent non-const access to component<C>().
- Correctly de-const component types before accessing
  Component<C>::family(). Avoids accidentally assigning new family IDs.
- ComponentHandle should handle const propagation correctly now.
- ComponentHandle.manager_ should now be `const EntityManager` where
  appropriate.
entityx/Entity.h
entityx/Entity_test.cc