Skip to content

Commit

Permalink
test: implicit noexcept-ness for dtors
Browse files Browse the repository at this point in the history
  • Loading branch information
skypjack committed Sep 16, 2024
1 parent 3f8efac commit 57b4638
Show file tree
Hide file tree
Showing 10 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion test/entt/core/any.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ struct tracker {
tracker(const tracker &) = default;
tracker &operator=(const tracker &) = delete;

~tracker() noexcept {
~tracker() {
++(*counter);
}

Expand Down
2 changes: 1 addition & 1 deletion test/entt/entity/registry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ struct destruction_order {
destruction_order(const destruction_order &) = delete;
destruction_order &operator=(const destruction_order &) = delete;

~destruction_order() noexcept {
~destruction_order() {
*ctx_check = *ctx_check && (registry->ctx().find<ctx_check_type>() != nullptr);
}

Expand Down
2 changes: 1 addition & 1 deletion test/entt/entity/storage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ struct update_from_destructor {
return *this;
}

~update_from_destructor() noexcept {
~update_from_destructor() {
if(target != entt::null && storage->contains(target)) {
storage->erase(target);
}
Expand Down
2 changes: 1 addition & 1 deletion test/entt/locator/locator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include "../../common/config.h"

struct base_service {
virtual ~base_service() noexcept = default;
virtual ~base_service() = default;
virtual int invoke(int) = 0;
};

Expand Down
6 changes: 3 additions & 3 deletions test/entt/meta/meta_any.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ struct empty {
empty(const empty &) = default;
empty &operator=(const empty &) = default;

virtual ~empty() noexcept {
virtual ~empty() {
++destructor_counter;
}

Expand All @@ -53,7 +53,7 @@ struct fat: empty {
fat(double v1, double v2, double v3, double v4)
: value{v1, v2, v3, v4} {}

~fat() noexcept override = default;
~fat() override = default;

fat(const fat &) = default;
fat &operator=(const fat &) = default;
Expand All @@ -74,7 +74,7 @@ struct unmanageable {
unmanageable()
: value{std::make_unique<int>(3)} {}

~unmanageable() noexcept = default;
~unmanageable() = default;

unmanageable(const unmanageable &) = delete;
unmanageable(unmanageable &&) = delete;
Expand Down
2 changes: 1 addition & 1 deletion test/entt/meta/meta_data.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#include "../../common/meta_traits.h"

struct base {
virtual ~base() noexcept = default;
virtual ~base() = default;

static void destroy(base &) {
++counter;
Expand Down
2 changes: 1 addition & 1 deletion test/entt/meta/meta_func.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

struct base {
base() = default;
virtual ~base() noexcept = default;
virtual ~base() = default;

void setter(int v) {
value = v;
Expand Down
2 changes: 1 addition & 1 deletion test/entt/meta/meta_type.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ struct derived: base {
};

struct abstract {
virtual ~abstract() noexcept = default;
virtual ~abstract() = default;

virtual void func(int) {}
void base_only(int) {}
Expand Down
2 changes: 1 addition & 1 deletion test/entt/resource/resource.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#include "../../common/linter.hpp"

struct base {
virtual ~base() noexcept = default;
virtual ~base() = default;

[[nodiscard]] virtual const entt::type_info &type() const noexcept {
return entt::type_id<base>();
Expand Down
2 changes: 1 addition & 1 deletion test/example/custom_identifier.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ struct entity_id final {
constexpr entity_id(entity_type value = null) noexcept
: entt{value} {}

~entity_id() noexcept = default;
~entity_id() = default;

constexpr entity_id(const entity_id &other) = default;
constexpr entity_id(entity_id &&other) noexcept = default;
Expand Down

0 comments on commit 57b4638

Please sign in to comment.