test: noexcept-ness review

This commit is contained in:
Michele Caini
2024-05-21 10:19:03 +02:00
parent d7c9609ee6
commit 991d16084d
9 changed files with 11 additions and 11 deletions
+1 -1
View File
@@ -24,7 +24,7 @@ struct tracker {
tracker(const tracker &) = default;
tracker &operator=(const tracker &) = delete;
~tracker() {
~tracker() noexcept {
++(*counter);
}
+1 -1
View File
@@ -70,7 +70,7 @@ struct destruction_order {
destruction_order(const destruction_order &) = delete;
destruction_order &operator=(const destruction_order &) = delete;
~destruction_order() {
~destruction_order() noexcept {
*ctx_check = *ctx_check && (registry->ctx().find<ctx_check_type>() != nullptr);
}
+1 -1
View File
@@ -39,7 +39,7 @@ struct update_from_destructor {
return *this;
}
~update_from_destructor() {
~update_from_destructor() noexcept {
if(target != entt::null && storage->contains(target)) {
storage->erase(target);
}
+1 -1
View File
@@ -4,7 +4,7 @@
#include "../../common/config.h"
struct base_service {
virtual ~base_service() = default;
virtual ~base_service() noexcept = default;
virtual int invoke(int) = 0;
};
+3 -3
View File
@@ -34,7 +34,7 @@ struct empty {
empty(const empty &) = default;
empty &operator=(const empty &) = default;
virtual ~empty() {
virtual ~empty() noexcept {
++destructor_counter;
}
@@ -53,7 +53,7 @@ struct fat: empty {
fat(double v1, double v2, double v3, double v4)
: value{v1, v2, v3, v4} {}
~fat() override = default;
~fat() noexcept override = default;
fat(const fat &) = default;
fat &operator=(const fat &) = default;
@@ -74,7 +74,7 @@ struct unmanageable {
unmanageable()
: value{std::make_unique<int>(3)} {}
~unmanageable() = default;
~unmanageable() noexcept = default;
unmanageable(const unmanageable &) = delete;
unmanageable(unmanageable &&) = delete;
+1 -1
View File
@@ -15,7 +15,7 @@
#include "../../common/config.h"
struct base {
virtual ~base() = default;
virtual ~base() noexcept = default;
static void destroy(base &) {
++counter;
+1 -1
View File
@@ -13,7 +13,7 @@
struct base {
base() = default;
virtual ~base() = default;
virtual ~base() noexcept = default;
void setter(int v) {
value = v;
+1 -1
View File
@@ -38,7 +38,7 @@ struct derived: base {
};
struct abstract {
virtual ~abstract() = default;
virtual ~abstract() noexcept = default;
virtual void func(int) {}
void base_only(int) {}
+1 -1
View File
@@ -6,7 +6,7 @@
#include "../../common/linter.hpp"
struct base {
virtual ~base() = default;
virtual ~base() noexcept = default;
[[nodiscard]] virtual const entt::type_info &type() const noexcept {
return entt::type_id<base>();