Skip to content

no warnings #37

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,6 @@ build:windows --host_platform=//bazel/platforms:windows
build:linux --platforms=//bazel/platforms:linux
build:linux --extra_toolchains=@llvm_toolchain//:cc-toolchain-x86_64-linux

build:no-warnings --per_file_copt=//.*@-Werror

try-import %workspace%/user.bazelrc
2 changes: 2 additions & 0 deletions .github/workflows/ci.bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,5 @@ test --test_output=errors
# Allows tests to run bazelisk-in-bazel, since this is the cache folder used
test --test_env=XDG_CACHE_HOME

build:linux --config=no-warnings

2 changes: 0 additions & 2 deletions ecsact/entt/detail/system_execution_context.hh
Original file line number Diff line number Diff line change
Expand Up @@ -375,8 +375,6 @@ struct system_execution_context : system_execution_context_base {

using associations = typename caps_info::associations;

auto other_entt_entity_id = info.get_entt_entity_id(other_entity);

ecsact_system_execution_context* return_context = nullptr;

constexpr auto assoc_count = mp_size<associations>::value;
Expand Down
1 change: 0 additions & 1 deletion ecsact/entt/system_view.hh
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ auto association_view(::entt::registry& registry) {
using assoc_marker_component =
association<typename Assoc::component_type, Assoc::field_offset>;
using extra_get_types = ::ecsact::mp_list<assoc_marker_component>;
using view_type = view_from_system_capabilities_type<Assoc, extra_get_types>;

return view_from_system_capabilities<Assoc, extra_get_types>(registry);
}
Expand Down
5 changes: 0 additions & 5 deletions ecsact/entt/trivial_system_impl.hh
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,12 @@ constexpr bool is_trivial_system() {
using readonly_components = typename caps_info::readonly_components;
using readwrite_components = typename caps_info::readwrite_components;
using writeonly_components = typename caps_info::writeonly_components;
using include_components = typename caps_info::include_components;
using exclude_components = typename caps_info::exclude_components;
using adds_components = typename caps_info::adds_components;
using removes_components = typename caps_info::removes_components;
using adds_tag_components = mp_filter<std::is_empty, adds_components>;
using remove_tag_components = mp_filter<std::is_empty, removes_components>;
using adds_non_tag_components = mp_filter<is_not_empty, adds_components>;

const bool can_add = !mp_empty<adds_components>::value;
const bool can_remove = !mp_empty<removes_components>::value;
const bool can_add_non_tag = !mp_empty<adds_non_tag_components>::value;

const bool can_only_add_tag = mp_size<adds_tag_components>::value ==
mp_size<adds_components>::value;
Expand Down
14 changes: 3 additions & 11 deletions runtime/test/runtime_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -278,16 +278,6 @@ TEST(Core, RemoveComponent) {
EXPECT_FALSE(ecsact_has_component(reg_id, entity, comp_id));
}

static void dynamic_impl(ecsact_system_execution_context* ctx) {
using runtime_test::ComponentA;

auto comp_id = static_cast<ecsact_component_like_id>(ComponentA::id);
ComponentA comp;
ecsact_system_execution_context_get(ctx, comp_id, &comp);
comp.a += 2;
ecsact_system_execution_context_update(ctx, comp_id, &comp);
}

TEST(Core, TrivialRemoveEvent) {
auto reg_id = ecsact_create_registry("TrivialRemoveEvent");
auto entity = ecsact_create_entity(reg_id);
Expand Down Expand Up @@ -647,7 +637,9 @@ TEST(Core, AssociationEntityCorrectness) {
++attack_damage_exec_count;
ecsact::execution_context ctx{cctx};
ASSERT_TRUE(attacker_entities.contains(ctx.entity()));
auto target_ctx = ctx.other(ctx.get<runtime_test::Attacking>().target);

// Santity check - no exception
ctx.other(ctx.get<runtime_test::Attacking>().target);
}
);

Expand Down