Просмотр исходного кода

test: use equals default as needed

Michele Caini 2 лет назад
Родитель
Сommit
9b7aa49adc

+ 1 - 1
test/entt/meta/meta_data.cpp

@@ -26,7 +26,7 @@ struct base_t {
 };
 
 struct derived_t: base_t {
-    derived_t() {}
+    derived_t() = default;
 };
 
 struct clazz_t {

+ 1 - 1
test/entt/meta/meta_func.cpp

@@ -12,7 +12,7 @@
 #include "../common/config.h"
 
 struct base_t {
-    base_t() {}
+    base_t() = default;
     virtual ~base_t() = default;
 
     static void destroy(base_t &) {

+ 2 - 7
test/example/custom_identifier.cpp

@@ -10,13 +10,8 @@ struct entity_id {
     constexpr entity_id(entity_type value = null) noexcept
         : entt{value} {}
 
-    constexpr entity_id(const entity_id &other) noexcept
-        : entt{other.entt} {}
-
-    constexpr entity_id &operator=(const entity_id &other) noexcept {
-        entt = other.entt;
-        return *this;
-    }
+    constexpr entity_id(const entity_id &other) noexcept = default;
+    constexpr entity_id &operator=(const entity_id &other) noexcept = default;
 
     constexpr operator entity_type() const noexcept {
         return entt;