Commit Graph
221 Commits
Author SHA1 Message Date
Michele Caini d0deefd0d7 review: registry (fix #199) 2019-03-09 00:35:11 +01:00
Michele Caini 9810da6982 batch add is now available 2019-03-08 22:49:14 +01:00
Michele Caini cb93a3bee3 minor changes 2019-03-08 22:49:14 +01:00
Michele Caini 78c171e0c2 meta: review 2019-03-01 17:07:08 +01:00
Michele Caini b0d3a84d1e setters/getters correctly handle references now (#fix 196) 2019-03-01 16:25:46 +01:00
Michele Caini eeeca3e21c fix #194 2019-02-28 00:06:12 +01:00
Michele Caini 4ee4af7fd4 updated registry::destroy for ranges 2019-02-27 23:56:07 +01:00
Michele Caini 9d65b44ab7 removed pointless extra arguments from dispatcher (close #190) 2019-02-27 15:04:17 +01:00
Michele Caini 350d51a92d const T & = --> std::as_const 2019-02-27 15:03:39 +01:00
Michele Caini de9886e011 more tests 2019-02-25 22:12:19 +01:00
Michele Caini 770e57c361 emitter works across boundaries now 2019-02-24 23:59:15 +01:00
Michele Caini d80a00701d dispatcher works across boundaries now 2019-02-24 23:37:08 +01:00
Michele Caini 105598ac8e (maybe) solved issue due to a bug of msvc 2019-02-23 23:47:38 +01:00
Michele Caini ff93f2220a workaround for msvc that seems not to appreciate much macros 2019-02-23 23:47:35 +01:00
Michele Caini 33fddcb289 added a test that goes across boundaries 2019-02-23 23:47:31 +01:00
Michele Caini 6a09bf2c54 increase code coverage with minimum effort 2019-02-23 23:47:26 +01:00
Michele Caini e0fd83211b lib support for registry (first draft) 2019-02-23 23:47:03 +01:00
Michele Caini f7c756d215 wip: make shared traits usable 2019-02-23 23:46:48 +01:00
Michele Caini 617635a989 wip: lib support 2019-02-23 23:46:42 +01:00
Michele Caini 8ef818f581 hashed string: added possibility to use both uint32 and uint64 2019-02-17 16:19:58 +01:00
Michele Caini ab5837c7c4 sigh: more tests 2019-02-17 16:17:21 +01:00
Michele Caini 9fbdbc1844 review: delegate/sigh 2019-02-17 16:17:13 +01:00
Michele Caini 8ab61637f0 fixed get-or-assign (close #185) 2019-02-12 14:29:15 +01:00
Michele Caini 7e0bd92593 fix #184 - conflicts between partial-owning groups aren't correctly detected 2019-02-10 23:00:59 +01:00
Michele Caini 99d9a9f44e fixed tests 2019-02-10 13:21:45 +01:00
Michele Caini 47e9330646 groups 2019-02-09 14:04:09 +01:00
Michele Caini faceff620a exclude is now a variable template 2019-02-08 17:20:21 +01:00
Michele Caini 45fdab27c9 meta_any: fixed #180 2019-02-01 23:48:00 +01:00
Michele Caini 7f1abab9ae bug fixing (find on views) 2019-01-29 09:00:34 +01:00
corystegel 9f997fe1fa Fix sparse_set invalid state when component constructor throws (#176)
Fix sparse_set invalid state when component constructor throws

Previously, a component's constructor that throws would cause the sparse
set to think that the entity still exists in the set. This is because the underlying
sparse set that stores the entities will have its entry added before the component
is added to the component set.

This could cause a number of invalid memory access problems such as the following:

1) Exception triggers destructor of enclosing object that then tries to remove
   the component that was just added. SparseSet<entity_t, Component>::has() will
   return true for the entity but when destroy() is called "instances" will be empty
   so instances.back() will be invalid.

2) If the exception is handled then calling get(entity) for the same entity
   identifier that initially threw the exception will give a position for that
   entity even though it was not added. This can cause an invalid memory access
   or accessing the data of a different stored component.
2019-01-25 22:36:30 +01:00
Michele Caini f558126854 fixed typo + added tests (thanks to Kerndog73) 2019-01-24 08:36:55 +01:00
Michele Caini fe3f6aa22b signal: review 2019-01-23 15:42:29 +01:00
Michele Caini 4b1d3a7b6f allow for null entity members (#174) 2019-01-13 22:28:40 +01:00
Michele Caini c91f9beddb removed raw view + added extended each member function to all the other views 2019-01-04 10:44:27 +01:00
Michele Caini 3c9a6ad218 delegate: curried functions can accept linked parameters either by value or by reference 2019-01-01 15:01:13 +01:00
Michele Caini 76eab21738 appveyor runs the tests now 2018-12-29 00:57:23 +01:00
Michele Caini d119032cb9 added support for extra arguments to dispatcher 2018-12-28 16:10:09 +01:00
Michele Caini d32c8e9457 empty type optimization 2018-12-26 14:50:30 +01:00
Michele Caini ebb2974ca7 added exclude alias for type_list 2018-12-21 16:23:23 +01:00
Michele Caini d9de7fe3b0 more tests 2018-12-19 15:26:21 +01:00
Michele Caini 24ba692884 delegate: support for curried functions 2018-12-19 14:18:59 +01:00
Michele Caini 960bbbde29 more on registry::clone (close #161) 2018-12-17 21:39:30 +01:00
Michele Caini 8212ed6d87 monostate: helper template variable 2018-12-16 13:49:13 +01:00
Michele Caini c639cb5285 added hashed_string::to_value for direct computation 2018-12-16 13:49:09 +01:00
Michele Caini b053f23d15 registry::clone supports type list now (close #165) 2018-12-14 22:24:52 +01:00
Michele Caini cb9a147fff clone functionality (close #161) 2018-12-13 08:55:43 +01:00
Michele Caini c9fddedbf1 UB/Crash in entt::insertion_sort (#167) 2018-12-11 14:17:39 +01:00
Michele Caini 73e5a9f45b support for filtered persistent views 2018-12-09 13:50:41 +01:00
Michele Caini 52b36f38a0 delegate: a few more tests 2018-11-30 11:52:39 +01:00
Michele Caini 781f283c89 utility: as_view (resolve #157) 2018-11-29 11:49:15 +01:00