File tree Expand file tree Collapse file tree 4 files changed +25
-3
lines changed Expand file tree Collapse file tree 4 files changed +25
-3
lines changed Original file line number Diff line number Diff line change @@ -223,7 +223,7 @@ namespace ecsact_entt_rt {
223
223
const C& get() {
224
224
#ifndef NDEBUG
225
225
assert (
226
- info.registry .all_of <C>(entity) &&
226
+ info.registry .template all_of <C>(entity) &&
227
227
" context get called for wrong component type. "
228
228
" Check system capabilities."
229
229
);
@@ -257,8 +257,11 @@ namespace ecsact_entt_rt {
257
257
>>;
258
258
259
259
#ifndef NDEBUG
260
+ [[maybe_unused]]
260
261
bool found_gettable_component = false ;
262
+ [[maybe_unused]]
261
263
const char * get_component_name = " " ;
264
+ [[maybe_unused]]
262
265
auto gettable_components_type_name = typeid (gettable_components).name ();
263
266
#endif // NDEBUG
264
267
Original file line number Diff line number Diff line change @@ -554,12 +554,20 @@ namespace ecsact::entt {
554
554
using boost::mp11::mp_flatten;
555
555
using boost::mp11::mp_push_back;
556
556
using boost::mp11::mp_map_find;
557
+ using boost::mp11::mp_first;
558
+ using boost::mp11::mp_transform;
557
559
using ecsact::entt::detail::pending_add;
558
560
using ecsact::entt_mp11_util::mp_map_find_value_or;
559
561
560
562
using caps_info = ecsact::system_capabilities_info<SystemT>;
561
563
562
- using system_generates = typename caps_info::generates;
564
+ using system_generates = mp_transform<
565
+ mp_first,
566
+ mp_flatten<
567
+ typename caps_info::generates,
568
+ ::ecsact::mp_list<>
569
+ >
570
+ >;
563
571
using adds_components = typename caps_info::adds_components;
564
572
static_assert (!std::is_same_v<system_generates, void >);
565
573
@@ -775,7 +783,7 @@ namespace ecsact::entt {
775
783
auto & assoc_view_itr = std::get<I>(assoc_views_itrs);
776
784
constexpr std::size_t offset = Assoc::field_offset;
777
785
assert (view.contains (entity));
778
- auto & comp = view.get <ComponentT>(entity);
786
+ auto & comp = view.template get <ComponentT>(entity);
779
787
auto field_entity_value = *reinterpret_cast <const ecsact_entity_id*>(
780
788
reinterpret_cast <const char *>(&comp) + offset
781
789
);
Original file line number Diff line number Diff line change @@ -26,6 +26,10 @@ void runtime_test::OtherEntitySystem::impl(context& ctx) {
26
26
other.update (other_comp);
27
27
}
28
28
29
+ void runtime_test::MakeAnother::impl (context& ctx) {
30
+
31
+ }
32
+
29
33
TEST (Core, CreateRegistry) {
30
34
auto reg_id = ecsact_create_registry (" CreateRegistry" );
31
35
EXPECT_NE (reg_id, ecsact_invalid_registry_id);
Original file line number Diff line number Diff line change @@ -20,3 +20,10 @@ system OtherEntitySystem {
20
20
readwrite ComponentA;
21
21
}
22
22
}
23
+
24
+ action MakeAnother {
25
+ readwrite ComponentA;
26
+ generates {
27
+ required OtherEntityComponent;
28
+ }
29
+ }
You can’t perform that action at this time.
0 commit comments