Browse Source

*: cleanup

Michele Caini 5 years ago
parent
commit
662cfc9fdc

+ 2 - 2
src/entt/entity/organizer.hpp

@@ -109,13 +109,13 @@ resource<type_list<>, type_list<Req...>> to_resource();
 
 /**
  * @brief Utility class for creating a static task graph.
- * 
+ *
  * This class offers minimal support (but sufficient in many cases) for creating
  * an execution graph from functions and their requirements on resources.<br/>
  * Note that the resulting tasks aren't executed in any case. This isn't the
  * goal of the tool. Instead, they are returned to the user in the form of a
  * graph that allows for safe execution.
- * 
+ *
  * @tparam Entity A valid entity type (see entt_traits for more details).
  */
 template<typename Entity>

+ 3 - 3
src/entt/signal/dispatcher.hpp

@@ -88,15 +88,15 @@ class dispatcher {
     template<typename Event>
     [[nodiscard]] pool_handler<Event> & assure() {
         const auto index = type_seq<Event>::value();
-        
+
         if(!(index < pools.size())) {
             pools.resize(std::size_t(index)+1u);
         }
-        
+
         if(!pools[index]) {
             pools[index].reset(new pool_handler<Event>{});
         }
-        
+
         return static_cast<pool_handler<Event> &>(*pools[index]);
     }
 

+ 4 - 4
src/entt/signal/emitter.hpp

@@ -34,7 +34,7 @@ namespace entt {
  * required to specify in advance the full list of accepted types.<br/>
  * Moreover, whenever an event is published, an emitter provides the listeners
  * with a reference to itself along with a reference to the event. Therefore
- * listeners have an handy way to work with it without incurring in the need of 
+ * listeners have an handy way to work with it without incurring in the need of
  * capturing a reference to the emitter.
  *
  * @tparam Derived Actual type of emitter that extends the class template.
@@ -124,15 +124,15 @@ class emitter {
     template<typename Event>
     [[nodiscard]] const pool_handler<Event> & assure() const {
         const auto index = type_seq<Event>::value();
-        
+
         if(!(index < pools.size())) {
             pools.resize(std::size_t(index)+1u);
         }
-        
+
         if(!pools[index]) {
             pools[index].reset(new pool_handler<Event>{});
         }
-        
+
         return static_cast<pool_handler<Event> &>(*pools[index]);
     }
 

+ 1 - 1
src/entt/signal/sigh.hpp

@@ -257,7 +257,7 @@ private:
  * The clear separation between a signal and a sink permits to store the former
  * as private data member without exposing the publish functionality to the
  * users of the class.
- * 
+ *
  * @warning
  * Lifetime of a sink must not overcome that of the signal to which it refers.
  * In any other case, attempting to use a sink results in undefined behavior.

+ 1 - 1
test/entt/core/type_info.cpp

@@ -75,4 +75,4 @@ TEST(TypeInfo, Functionalities) {
 
     ASSERT_TRUE(empty);
     ASSERT_EQ(empty.hash(), other.hash());
-}
+}

+ 1 - 1
test/entt/entity/observer.cpp

@@ -366,4 +366,4 @@ TEST(Observer, GroupCornerCase) {
 
     ASSERT_FALSE(add_observer.empty());
     ASSERT_TRUE(remove_observer.empty());
-}
+}

+ 247 - 247
test/entt/entity/organizer.cpp

@@ -9,340 +9,340 @@ void ro_int_double(entt::view<entt::exclude_t<>, const int>, const double &) {}
 void sync_point(entt::registry &) {}
 
 struct clazz {
-	void ro_int_char_double(entt::view<entt::exclude_t<>, const int, const char>, const double &) {}
-	void rw_int(entt::view<entt::exclude_t<>, int>) {}
-	void rw_int_char(entt::view<entt::exclude_t<>, int, char>) {}
-	void rw_int_char_double(entt::view<entt::exclude_t<>, int, char>, double &) {}
+    void ro_int_char_double(entt::view<entt::exclude_t<>, const int, const char>, const double &) {}
+    void rw_int(entt::view<entt::exclude_t<>, int>) {}
+    void rw_int_char(entt::view<entt::exclude_t<>, int, char>) {}
+    void rw_int_char_double(entt::view<entt::exclude_t<>, int, char>, double &) {}
 };
 
 void to_args_integrity(entt::view<entt::exclude_t<>, int> view, std::size_t &value, entt::registry &registry) {
-	value = view.size();
+    value = view.size();
 }
 
 TEST(Organizer, EmplaceFreeFunction) {
-	entt::organizer organizer;
-	entt::registry registry;
+    entt::organizer organizer;
+    entt::registry registry;
 
-	organizer.emplace<&ro_int_rw_char_double>("t1");
-	organizer.emplace<&ro_char_rw_int>("t2");
-	organizer.emplace<&ro_char_rw_double>("t3");
-	organizer.emplace<&ro_int_double>("t4");
+    organizer.emplace<&ro_int_rw_char_double>("t1");
+    organizer.emplace<&ro_char_rw_int>("t2");
+    organizer.emplace<&ro_char_rw_double>("t3");
+    organizer.emplace<&ro_int_double>("t4");
 
-	const auto graph = organizer.graph();
+    const auto graph = organizer.graph();
 
-	ASSERT_EQ(graph.size(), 4u);
+    ASSERT_EQ(graph.size(), 4u);
 
-	ASSERT_STREQ(graph[0u].name(), "t1");
-	ASSERT_STREQ(graph[1u].name(), "t2");
-	ASSERT_STREQ(graph[2u].name(), "t3");
-	ASSERT_STREQ(graph[3u].name(), "t4");
+    ASSERT_STREQ(graph[0u].name(), "t1");
+    ASSERT_STREQ(graph[1u].name(), "t2");
+    ASSERT_STREQ(graph[2u].name(), "t3");
+    ASSERT_STREQ(graph[3u].name(), "t4");
 
-	ASSERT_EQ(graph[0u].ro_count(), 1u);
-	ASSERT_EQ(graph[1u].ro_count(), 1u);
-	ASSERT_EQ(graph[2u].ro_count(), 1u);
-	ASSERT_EQ(graph[3u].ro_count(), 2u);
+    ASSERT_EQ(graph[0u].ro_count(), 1u);
+    ASSERT_EQ(graph[1u].ro_count(), 1u);
+    ASSERT_EQ(graph[2u].ro_count(), 1u);
+    ASSERT_EQ(graph[3u].ro_count(), 2u);
 
-	ASSERT_EQ(graph[0u].rw_count(), 2u);
-	ASSERT_EQ(graph[1u].rw_count(), 1u);
-	ASSERT_EQ(graph[2u].rw_count(), 1u);
-	ASSERT_EQ(graph[3u].rw_count(), 0u);
+    ASSERT_EQ(graph[0u].rw_count(), 2u);
+    ASSERT_EQ(graph[1u].rw_count(), 1u);
+    ASSERT_EQ(graph[2u].rw_count(), 1u);
+    ASSERT_EQ(graph[3u].rw_count(), 0u);
 
-	ASSERT_NE(graph[0u].info(), graph[1u].info());
-	ASSERT_NE(graph[1u].info(), graph[2u].info());
-	ASSERT_NE(graph[2u].info(), graph[3u].info());
+    ASSERT_NE(graph[0u].info(), graph[1u].info());
+    ASSERT_NE(graph[1u].info(), graph[2u].info());
+    ASSERT_NE(graph[2u].info(), graph[3u].info());
 
-	ASSERT_TRUE(graph[0u].top_level());
-	ASSERT_FALSE(graph[1u].top_level());
-	ASSERT_FALSE(graph[2u].top_level());
-	ASSERT_FALSE(graph[3u].top_level());
+    ASSERT_TRUE(graph[0u].top_level());
+    ASSERT_FALSE(graph[1u].top_level());
+    ASSERT_FALSE(graph[2u].top_level());
+    ASSERT_FALSE(graph[3u].top_level());
 
-	ASSERT_EQ(graph[0u].children().size(), 2u);
-	ASSERT_EQ(graph[1u].children().size(), 1u);
-	ASSERT_EQ(graph[2u].children().size(), 1u);
-	ASSERT_EQ(graph[3u].children().size(), 0u);
+    ASSERT_EQ(graph[0u].children().size(), 2u);
+    ASSERT_EQ(graph[1u].children().size(), 1u);
+    ASSERT_EQ(graph[2u].children().size(), 1u);
+    ASSERT_EQ(graph[3u].children().size(), 0u);
 
-	ASSERT_EQ(graph[0u].children()[0u], 1u);
-	ASSERT_EQ(graph[0u].children()[1u], 2u);
-	ASSERT_EQ(graph[1u].children()[0u], 3u);
-	ASSERT_EQ(graph[2u].children()[0u], 3u);
+    ASSERT_EQ(graph[0u].children()[0u], 1u);
+    ASSERT_EQ(graph[0u].children()[1u], 2u);
+    ASSERT_EQ(graph[1u].children()[0u], 3u);
+    ASSERT_EQ(graph[2u].children()[0u], 3u);
 
-	for(auto &&vertex: graph) {
-		ASSERT_NO_THROW(vertex.callback()(vertex.data(), registry));
-	}
+    for(auto &&vertex: graph) {
+        ASSERT_NO_THROW(vertex.callback()(vertex.data(), registry));
+    }
 
-	organizer.clear();
+    organizer.clear();
 
-	ASSERT_EQ(organizer.graph().size(), 0u);
+    ASSERT_EQ(organizer.graph().size(), 0u);
 }
 
 TEST(Organizer, EmplaceMemberFunction) {
-	entt::organizer organizer;
-	entt::registry registry;
-	clazz instance;
+    entt::organizer organizer;
+    entt::registry registry;
+    clazz instance;
 
-	organizer.emplace<&clazz::ro_int_char_double>(instance, "t1");
-	organizer.emplace<&clazz::rw_int>(instance, "t2");
-	organizer.emplace<&clazz::rw_int_char>(instance, "t3");
-	organizer.emplace<&clazz::rw_int_char_double>(instance, "t4");
+    organizer.emplace<&clazz::ro_int_char_double>(instance, "t1");
+    organizer.emplace<&clazz::rw_int>(instance, "t2");
+    organizer.emplace<&clazz::rw_int_char>(instance, "t3");
+    organizer.emplace<&clazz::rw_int_char_double>(instance, "t4");
 
-	const auto graph = organizer.graph();
+    const auto graph = organizer.graph();
 
-	ASSERT_EQ(graph.size(), 4u);
+    ASSERT_EQ(graph.size(), 4u);
 
-	ASSERT_STREQ(graph[0u].name(), "t1");
-	ASSERT_STREQ(graph[1u].name(), "t2");
-	ASSERT_STREQ(graph[2u].name(), "t3");
-	ASSERT_STREQ(graph[3u].name(), "t4");
+    ASSERT_STREQ(graph[0u].name(), "t1");
+    ASSERT_STREQ(graph[1u].name(), "t2");
+    ASSERT_STREQ(graph[2u].name(), "t3");
+    ASSERT_STREQ(graph[3u].name(), "t4");
 
-	ASSERT_EQ(graph[0u].ro_count(), 3u);
-	ASSERT_EQ(graph[1u].ro_count(), 0u);
-	ASSERT_EQ(graph[2u].ro_count(), 0u);
-	ASSERT_EQ(graph[3u].ro_count(), 0u);
+    ASSERT_EQ(graph[0u].ro_count(), 3u);
+    ASSERT_EQ(graph[1u].ro_count(), 0u);
+    ASSERT_EQ(graph[2u].ro_count(), 0u);
+    ASSERT_EQ(graph[3u].ro_count(), 0u);
 
-	ASSERT_EQ(graph[0u].rw_count(), 0u);
-	ASSERT_EQ(graph[1u].rw_count(), 1u);
-	ASSERT_EQ(graph[2u].rw_count(), 2u);
-	ASSERT_EQ(graph[3u].rw_count(), 3u);
+    ASSERT_EQ(graph[0u].rw_count(), 0u);
+    ASSERT_EQ(graph[1u].rw_count(), 1u);
+    ASSERT_EQ(graph[2u].rw_count(), 2u);
+    ASSERT_EQ(graph[3u].rw_count(), 3u);
 
-	ASSERT_NE(graph[0u].info(), graph[1u].info());
-	ASSERT_NE(graph[1u].info(), graph[2u].info());
-	ASSERT_NE(graph[2u].info(), graph[3u].info());
+    ASSERT_NE(graph[0u].info(), graph[1u].info());
+    ASSERT_NE(graph[1u].info(), graph[2u].info());
+    ASSERT_NE(graph[2u].info(), graph[3u].info());
 
-	ASSERT_TRUE(graph[0u].top_level());
-	ASSERT_FALSE(graph[1u].top_level());
-	ASSERT_FALSE(graph[2u].top_level());
-	ASSERT_FALSE(graph[3u].top_level());
+    ASSERT_TRUE(graph[0u].top_level());
+    ASSERT_FALSE(graph[1u].top_level());
+    ASSERT_FALSE(graph[2u].top_level());
+    ASSERT_FALSE(graph[3u].top_level());
 
-	ASSERT_EQ(graph[0u].children().size(), 1u);
-	ASSERT_EQ(graph[1u].children().size(), 1u);
-	ASSERT_EQ(graph[2u].children().size(), 1u);
-	ASSERT_EQ(graph[3u].children().size(), 0u);
+    ASSERT_EQ(graph[0u].children().size(), 1u);
+    ASSERT_EQ(graph[1u].children().size(), 1u);
+    ASSERT_EQ(graph[2u].children().size(), 1u);
+    ASSERT_EQ(graph[3u].children().size(), 0u);
 
-	ASSERT_EQ(graph[0u].children()[0u], 1u);
-	ASSERT_EQ(graph[1u].children()[0u], 2u);
-	ASSERT_EQ(graph[2u].children()[0u], 3u);
+    ASSERT_EQ(graph[0u].children()[0u], 1u);
+    ASSERT_EQ(graph[1u].children()[0u], 2u);
+    ASSERT_EQ(graph[2u].children()[0u], 3u);
 
-	for(auto &&vertex: graph) {
-		ASSERT_NO_THROW(vertex.callback()(vertex.data(), registry));
-	}
+    for(auto &&vertex: graph) {
+        ASSERT_NO_THROW(vertex.callback()(vertex.data(), registry));
+    }
 
-	organizer.clear();
+    organizer.clear();
 
-	ASSERT_EQ(organizer.graph().size(), 0u);
+    ASSERT_EQ(organizer.graph().size(), 0u);
 }
 
 TEST(Organizer, EmplaceDirectFunction) {
-	entt::organizer organizer;
-	entt::registry registry;
-	clazz instance;
-
-	// no aggressive comdat
-	auto t1 = +[](const void *, entt::registry &reg) { reg.clear<int>(); };
-	auto t2 = +[](const void *, entt::registry &reg) { reg.clear<char>(); };
-	auto t3 = +[](const void *, entt::registry &reg) { reg.clear<double>(); };
-	auto t4 = +[](const void *, entt::registry &reg) { reg.clear(); };
-
-	organizer.emplace<int>(t1, nullptr, "t1");
-	organizer.emplace<const int>(t2, &instance, "t2");
-	organizer.emplace<const int, char>(t3, nullptr, "t3");
-	organizer.emplace<int, char, double>(t4, &instance, "t4");
-
-	const auto graph = organizer.graph();
-
-	ASSERT_EQ(graph.size(), 4u);
-
-	ASSERT_STREQ(graph[0u].name(), "t1");
-	ASSERT_STREQ(graph[1u].name(), "t2");
-	ASSERT_STREQ(graph[2u].name(), "t3");
-	ASSERT_STREQ(graph[3u].name(), "t4");
-
-	ASSERT_EQ(graph[0u].ro_count(), 0u);
-	ASSERT_EQ(graph[1u].ro_count(), 1u);
-	ASSERT_EQ(graph[2u].ro_count(), 1u);
-	ASSERT_EQ(graph[3u].ro_count(), 0u);
-
-	ASSERT_EQ(graph[0u].rw_count(), 1u);
-	ASSERT_EQ(graph[1u].rw_count(), 0u);
-	ASSERT_EQ(graph[2u].rw_count(), 1u);
-	ASSERT_EQ(graph[3u].rw_count(), 3u);
-
-	ASSERT_TRUE(graph[0u].callback() == t1);
-	ASSERT_TRUE(graph[1u].callback() == t2);
-	ASSERT_TRUE(graph[2u].callback() == t3);
-	ASSERT_TRUE(graph[3u].callback() == t4);
-
-	ASSERT_EQ(graph[0u].data(), nullptr);
-	ASSERT_EQ(graph[1u].data(), &instance);
-	ASSERT_EQ(graph[2u].data(), nullptr);
-	ASSERT_EQ(graph[3u].data(), &instance);
-
-	ASSERT_EQ(graph[0u].info(), entt::type_info{});
-	ASSERT_EQ(graph[1u].info(), entt::type_info{});
-	ASSERT_EQ(graph[2u].info(), entt::type_info{});
-	ASSERT_EQ(graph[3u].info(), entt::type_info{});
-
-	ASSERT_TRUE(graph[0u].top_level());
-	ASSERT_FALSE(graph[1u].top_level());
-	ASSERT_FALSE(graph[2u].top_level());
-	ASSERT_FALSE(graph[3u].top_level());
-
-	ASSERT_EQ(graph[0u].children().size(), 2u);
-	ASSERT_EQ(graph[1u].children().size(), 1u);
-	ASSERT_EQ(graph[2u].children().size(), 1u);
-	ASSERT_EQ(graph[3u].children().size(), 0u);
-
-	ASSERT_EQ(graph[0u].children()[0u], 1u);
-	ASSERT_EQ(graph[0u].children()[1u], 2u);
-	ASSERT_EQ(graph[1u].children()[0u], 3u);
-	ASSERT_EQ(graph[2u].children()[0u], 3u);
-
-	for(auto &&vertex: graph) {
-		ASSERT_NO_THROW(vertex.callback()(vertex.data(), registry));
-	}
-
-	organizer.clear();
-
-	ASSERT_EQ(organizer.graph().size(), 0u);
+    entt::organizer organizer;
+    entt::registry registry;
+    clazz instance;
+
+    // no aggressive comdat
+    auto t1 = +[](const void *, entt::registry &reg) { reg.clear<int>(); };
+    auto t2 = +[](const void *, entt::registry &reg) { reg.clear<char>(); };
+    auto t3 = +[](const void *, entt::registry &reg) { reg.clear<double>(); };
+    auto t4 = +[](const void *, entt::registry &reg) { reg.clear(); };
+
+    organizer.emplace<int>(t1, nullptr, "t1");
+    organizer.emplace<const int>(t2, &instance, "t2");
+    organizer.emplace<const int, char>(t3, nullptr, "t3");
+    organizer.emplace<int, char, double>(t4, &instance, "t4");
+
+    const auto graph = organizer.graph();
+
+    ASSERT_EQ(graph.size(), 4u);
+
+    ASSERT_STREQ(graph[0u].name(), "t1");
+    ASSERT_STREQ(graph[1u].name(), "t2");
+    ASSERT_STREQ(graph[2u].name(), "t3");
+    ASSERT_STREQ(graph[3u].name(), "t4");
+
+    ASSERT_EQ(graph[0u].ro_count(), 0u);
+    ASSERT_EQ(graph[1u].ro_count(), 1u);
+    ASSERT_EQ(graph[2u].ro_count(), 1u);
+    ASSERT_EQ(graph[3u].ro_count(), 0u);
+
+    ASSERT_EQ(graph[0u].rw_count(), 1u);
+    ASSERT_EQ(graph[1u].rw_count(), 0u);
+    ASSERT_EQ(graph[2u].rw_count(), 1u);
+    ASSERT_EQ(graph[3u].rw_count(), 3u);
+
+    ASSERT_TRUE(graph[0u].callback() == t1);
+    ASSERT_TRUE(graph[1u].callback() == t2);
+    ASSERT_TRUE(graph[2u].callback() == t3);
+    ASSERT_TRUE(graph[3u].callback() == t4);
+
+    ASSERT_EQ(graph[0u].data(), nullptr);
+    ASSERT_EQ(graph[1u].data(), &instance);
+    ASSERT_EQ(graph[2u].data(), nullptr);
+    ASSERT_EQ(graph[3u].data(), &instance);
+
+    ASSERT_EQ(graph[0u].info(), entt::type_info{});
+    ASSERT_EQ(graph[1u].info(), entt::type_info{});
+    ASSERT_EQ(graph[2u].info(), entt::type_info{});
+    ASSERT_EQ(graph[3u].info(), entt::type_info{});
+
+    ASSERT_TRUE(graph[0u].top_level());
+    ASSERT_FALSE(graph[1u].top_level());
+    ASSERT_FALSE(graph[2u].top_level());
+    ASSERT_FALSE(graph[3u].top_level());
+
+    ASSERT_EQ(graph[0u].children().size(), 2u);
+    ASSERT_EQ(graph[1u].children().size(), 1u);
+    ASSERT_EQ(graph[2u].children().size(), 1u);
+    ASSERT_EQ(graph[3u].children().size(), 0u);
+
+    ASSERT_EQ(graph[0u].children()[0u], 1u);
+    ASSERT_EQ(graph[0u].children()[1u], 2u);
+    ASSERT_EQ(graph[1u].children()[0u], 3u);
+    ASSERT_EQ(graph[2u].children()[0u], 3u);
+
+    for(auto &&vertex: graph) {
+        ASSERT_NO_THROW(vertex.callback()(vertex.data(), registry));
+    }
+
+    organizer.clear();
+
+    ASSERT_EQ(organizer.graph().size(), 0u);
 }
 
 TEST(Organizer, SyncPoint) {
-	entt::organizer organizer;
-	entt::registry registry;
-	clazz instance;
+    entt::organizer organizer;
+    entt::registry registry;
+    clazz instance;
 
-	organizer.emplace<&ro_int_double>("before");
-	organizer.emplace<&sync_point>("sync");
-	organizer.emplace<&clazz::ro_int_char_double>(instance, "after");
+    organizer.emplace<&ro_int_double>("before");
+    organizer.emplace<&sync_point>("sync");
+    organizer.emplace<&clazz::ro_int_char_double>(instance, "after");
 
-	const auto graph = organizer.graph();
+    const auto graph = organizer.graph();
 
-	ASSERT_EQ(graph.size(), 3u);
+    ASSERT_EQ(graph.size(), 3u);
 
-	ASSERT_STREQ(graph[0u].name(), "before");
-	ASSERT_STREQ(graph[1u].name(), "sync");
-	ASSERT_STREQ(graph[2u].name(), "after");
+    ASSERT_STREQ(graph[0u].name(), "before");
+    ASSERT_STREQ(graph[1u].name(), "sync");
+    ASSERT_STREQ(graph[2u].name(), "after");
 
-	ASSERT_TRUE(graph[0u].top_level());
-	ASSERT_FALSE(graph[1u].top_level());
-	ASSERT_FALSE(graph[2u].top_level());
+    ASSERT_TRUE(graph[0u].top_level());
+    ASSERT_FALSE(graph[1u].top_level());
+    ASSERT_FALSE(graph[2u].top_level());
 
-	ASSERT_EQ(graph[0u].children().size(), 1u);
-	ASSERT_EQ(graph[1u].children().size(), 1u);
-	ASSERT_EQ(graph[2u].children().size(), 0u);
+    ASSERT_EQ(graph[0u].children().size(), 1u);
+    ASSERT_EQ(graph[1u].children().size(), 1u);
+    ASSERT_EQ(graph[2u].children().size(), 0u);
 
-	ASSERT_EQ(graph[0u].children()[0u], 1u);
-	ASSERT_EQ(graph[1u].children()[0u], 2u);
+    ASSERT_EQ(graph[0u].children()[0u], 1u);
+    ASSERT_EQ(graph[1u].children()[0u], 2u);
 
-	for(auto &&vertex: graph) {
-		ASSERT_NO_THROW(vertex.callback()(vertex.data(), registry));
-	}
+    for(auto &&vertex: graph) {
+        ASSERT_NO_THROW(vertex.callback()(vertex.data(), registry));
+    }
 }
 
 TEST(Organizer, Override) {
-	entt::organizer organizer;
+    entt::organizer organizer;
 
-	organizer.emplace<&ro_int_rw_char_double, const char, const double>("t1");
-	organizer.emplace<&ro_char_rw_double, const double>("t2");
-	organizer.emplace<&ro_int_double, double>("t3");
+    organizer.emplace<&ro_int_rw_char_double, const char, const double>("t1");
+    organizer.emplace<&ro_char_rw_double, const double>("t2");
+    organizer.emplace<&ro_int_double, double>("t3");
 
-	const auto graph = organizer.graph();
+    const auto graph = organizer.graph();
 
-	ASSERT_EQ(graph.size(), 3u);
+    ASSERT_EQ(graph.size(), 3u);
 
-	ASSERT_STREQ(graph[0u].name(), "t1");
-	ASSERT_STREQ(graph[1u].name(), "t2");
-	ASSERT_STREQ(graph[2u].name(), "t3");
+    ASSERT_STREQ(graph[0u].name(), "t1");
+    ASSERT_STREQ(graph[1u].name(), "t2");
+    ASSERT_STREQ(graph[2u].name(), "t3");
 
-	ASSERT_TRUE(graph[0u].top_level());
-	ASSERT_TRUE(graph[1u].top_level());
-	ASSERT_FALSE(graph[2u].top_level());
+    ASSERT_TRUE(graph[0u].top_level());
+    ASSERT_TRUE(graph[1u].top_level());
+    ASSERT_FALSE(graph[2u].top_level());
 
-	ASSERT_EQ(graph[0u].children().size(), 1u);
-	ASSERT_EQ(graph[1u].children().size(), 1u);
-	ASSERT_EQ(graph[2u].children().size(), 0u);
+    ASSERT_EQ(graph[0u].children().size(), 1u);
+    ASSERT_EQ(graph[1u].children().size(), 1u);
+    ASSERT_EQ(graph[2u].children().size(), 0u);
 
-	ASSERT_EQ(graph[0u].children()[0u], 2u);
-	ASSERT_EQ(graph[1u].children()[0u], 2u);
+    ASSERT_EQ(graph[0u].children()[0u], 2u);
+    ASSERT_EQ(graph[1u].children()[0u], 2u);
 }
 
 TEST(Organizer, Prepare) {
-	entt::organizer organizer;
-	entt::registry registry;
-	clazz instance;
+    entt::organizer organizer;
+    entt::registry registry;
+    clazz instance;
 
-	organizer.emplace<&ro_int_double>();
-	organizer.emplace<&clazz::rw_int_char>(instance);
+    organizer.emplace<&ro_int_double>();
+    organizer.emplace<&clazz::rw_int_char>(instance);
 
-	const auto graph = organizer.graph();
+    const auto graph = organizer.graph();
 
-	ASSERT_EQ(registry.try_ctx<int>(), nullptr);
-	ASSERT_EQ(registry.try_ctx<char>(), nullptr);
-	ASSERT_EQ(registry.try_ctx<double>(), nullptr);
+    ASSERT_EQ(registry.try_ctx<int>(), nullptr);
+    ASSERT_EQ(registry.try_ctx<char>(), nullptr);
+    ASSERT_EQ(registry.try_ctx<double>(), nullptr);
 
-	for(auto &&vertex: graph) {
-		vertex.prepare(registry);
-	}
+    for(auto &&vertex: graph) {
+        vertex.prepare(registry);
+    }
 
-	ASSERT_EQ(registry.try_ctx<int>(), nullptr);
-	ASSERT_EQ(registry.try_ctx<char>(), nullptr);
-	ASSERT_NE(registry.try_ctx<double>(), nullptr);
+    ASSERT_EQ(registry.try_ctx<int>(), nullptr);
+    ASSERT_EQ(registry.try_ctx<char>(), nullptr);
+    ASSERT_NE(registry.try_ctx<double>(), nullptr);
 }
 
 TEST(Organizer, Dependencies) {
-	entt::organizer organizer;
-	clazz instance;
+    entt::organizer organizer;
+    clazz instance;
 
-	organizer.emplace<&ro_int_double>();
-	organizer.emplace<&clazz::rw_int_char>(instance);
-	organizer.emplace<char, const double>(+[](const void *, entt::registry &) {});
+    organizer.emplace<&ro_int_double>();
+    organizer.emplace<&clazz::rw_int_char>(instance);
+    organizer.emplace<char, const double>(+[](const void *, entt::registry &) {});
 
-	const auto graph = organizer.graph();
-	entt::type_info buffer[5u]{};
+    const auto graph = organizer.graph();
+    entt::type_info buffer[5u]{};
 
-	ASSERT_EQ(graph.size(), 3u);
+    ASSERT_EQ(graph.size(), 3u);
 
-	ASSERT_EQ(graph[0u].ro_count(), 2u);
-	ASSERT_EQ(graph[0u].rw_count(), 0u);
+    ASSERT_EQ(graph[0u].ro_count(), 2u);
+    ASSERT_EQ(graph[0u].rw_count(), 0u);
 
-	ASSERT_EQ(graph[0u].ro_dependency(buffer, 0u), 0u);
-	ASSERT_EQ(graph[0u].rw_dependency(buffer, 2u), 0u);
+    ASSERT_EQ(graph[0u].ro_dependency(buffer, 0u), 0u);
+    ASSERT_EQ(graph[0u].rw_dependency(buffer, 2u), 0u);
 
-	ASSERT_EQ(graph[0u].ro_dependency(buffer, 5u), 2u);
-	ASSERT_EQ(buffer[0u], entt::type_id<int>());
-	ASSERT_EQ(buffer[1u], entt::type_id<double>());
+    ASSERT_EQ(graph[0u].ro_dependency(buffer, 5u), 2u);
+    ASSERT_EQ(buffer[0u], entt::type_id<int>());
+    ASSERT_EQ(buffer[1u], entt::type_id<double>());
 
-	ASSERT_EQ(graph[1u].ro_count(), 0u);
-	ASSERT_EQ(graph[1u].rw_count(), 2u);
+    ASSERT_EQ(graph[1u].ro_count(), 0u);
+    ASSERT_EQ(graph[1u].rw_count(), 2u);
 
-	ASSERT_EQ(graph[1u].ro_dependency(buffer, 2u), 0u);
-	ASSERT_EQ(graph[1u].rw_dependency(buffer, 0u), 0u);
+    ASSERT_EQ(graph[1u].ro_dependency(buffer, 2u), 0u);
+    ASSERT_EQ(graph[1u].rw_dependency(buffer, 0u), 0u);
 
-	ASSERT_EQ(graph[1u].rw_dependency(buffer, 5u), 2u);
-	ASSERT_EQ(buffer[0u], entt::type_id<int>());
-	ASSERT_EQ(buffer[1u], entt::type_id<char>());
+    ASSERT_EQ(graph[1u].rw_dependency(buffer, 5u), 2u);
+    ASSERT_EQ(buffer[0u], entt::type_id<int>());
+    ASSERT_EQ(buffer[1u], entt::type_id<char>());
 
-	ASSERT_EQ(graph[2u].ro_count(), 1u);
-	ASSERT_EQ(graph[2u].rw_count(), 1u);
+    ASSERT_EQ(graph[2u].ro_count(), 1u);
+    ASSERT_EQ(graph[2u].rw_count(), 1u);
 
-	ASSERT_EQ(graph[2u].ro_dependency(buffer, 2u), 1u);
-	ASSERT_EQ(graph[2u].rw_dependency(buffer, 0u), 0u);
+    ASSERT_EQ(graph[2u].ro_dependency(buffer, 2u), 1u);
+    ASSERT_EQ(graph[2u].rw_dependency(buffer, 0u), 0u);
 
-	ASSERT_EQ(graph[2u].ro_dependency(buffer, 5u), 1u);
-	ASSERT_EQ(buffer[0u], entt::type_id<double>());
+    ASSERT_EQ(graph[2u].ro_dependency(buffer, 5u), 1u);
+    ASSERT_EQ(buffer[0u], entt::type_id<double>());
 
-	ASSERT_EQ(graph[2u].rw_dependency(buffer, 5u), 1u);
-	ASSERT_EQ(buffer[0u], entt::type_id<char>());
+    ASSERT_EQ(graph[2u].rw_dependency(buffer, 5u), 1u);
+    ASSERT_EQ(buffer[0u], entt::type_id<char>());
 }
 
 TEST(Organizer, ToArgsIntegrity) {
-	entt::organizer organizer;
-	entt::registry registry;
+    entt::organizer organizer;
+    entt::registry registry;
 
-	organizer.emplace<&to_args_integrity>();
-	registry.set<std::size_t>(42u);
+    organizer.emplace<&to_args_integrity>();
+    registry.set<std::size_t>(42u);
 
-	auto graph = organizer.graph();
-	graph[0u].callback()(graph[0u].data(), registry);
+    auto graph = organizer.graph();
+    graph[0u].callback()(graph[0u].data(), registry);
 
-	ASSERT_EQ(registry.ctx<std::size_t>(), 0u);
+    ASSERT_EQ(registry.ctx<std::size_t>(), 0u);
 }

+ 12 - 14
test/entt/entity/view_pack.cpp

@@ -73,7 +73,6 @@ TEST(ViewPack, Iterator) {
     registry.emplace<char>(entity);
 
     const auto pack = registry.view<int>() | registry.view<char>();
-    using iterator = typename decltype(pack)::iterator;
 
     ASSERT_NE(pack.begin(), pack.end());
     ASSERT_EQ(pack.begin()++, pack.begin());
@@ -88,7 +87,6 @@ TEST(ViewPack, ReverseIterator) {
     registry.emplace<char>(entity);
 
     const auto pack = registry.view<int>() | registry.view<char>();
-    using iterator = typename decltype(pack)::reverse_iterator;
 
     ASSERT_NE(pack.rbegin(), pack.rend());
     ASSERT_EQ(pack.rbegin()++, pack.rbegin());
@@ -327,16 +325,16 @@ TEST(ViewPack, ShortestPool) {
     ASSERT_FALSE(eit != pack.each().end());
 
     {
-	    std::size_t next{};
-	    
-	    for(const auto [entt, cv, iv]: pack.each()) {
-	        static_assert(std::is_same_v<decltype(entt), const entt::entity>);
-	        static_assert(std::is_same_v<decltype(cv), char &>);
-	        static_assert(std::is_same_v<decltype(iv), const int &>);
-	        ASSERT_EQ(entt::to_integral(entt), ++next);
-	        ASSERT_EQ(&cv, registry.try_get<char>(entt));
-	        ASSERT_EQ(&iv, registry.try_get<int>(entt));
-	    }
+        std::size_t next{};
+
+        for(const auto [entt, cv, iv]: pack.each()) {
+            static_assert(std::is_same_v<decltype(entt), const entt::entity>);
+            static_assert(std::is_same_v<decltype(cv), char &>);
+            static_assert(std::is_same_v<decltype(iv), const int &>);
+            ASSERT_EQ(entt::to_integral(entt), ++next);
+            ASSERT_EQ(&cv, registry.try_get<char>(entt));
+            ASSERT_EQ(&iv, registry.try_get<int>(entt));
+        }
     }
 }
 
@@ -354,7 +352,7 @@ TEST(ViewPack, LongestPool) {
 
     {
         std::size_t next{2u};
-        
+
         for(const auto entt: pack) {
             ASSERT_EQ(entt::to_integral(entt), next--);
             ASSERT_TRUE((registry.has<int, char>(entt)));
@@ -393,7 +391,7 @@ TEST(ViewPack, LongestPool) {
 
     {
         std::size_t next{2u};
-        
+
         for(const auto [entt, iv, cv]: pack.each()) {
             static_assert(std::is_same_v<decltype(entt), const entt::entity>);
             static_assert(std::is_same_v<decltype(iv), int &>);

+ 12 - 12
test/entt/meta/meta_any.cpp

@@ -9,7 +9,7 @@ struct clazz_t {
     void member(int i) { value = i; }
     static void func() { c = 'd'; }
 
-	static inline char c = 'c';
+    static inline char c = 'c';
     int value = 0;
 };
 
@@ -641,27 +641,27 @@ TEST_F(MetaAny, Invoke) {
     clazz_t instance;
     entt::meta_any any{std::ref(instance)};
 
-	ASSERT_TRUE(any.invoke("func"_hs));
-	ASSERT_TRUE(any.invoke("member"_hs, 42));
-	ASSERT_FALSE(any.invoke("non_existent"_hs, 42));
+    ASSERT_TRUE(any.invoke("func"_hs));
+    ASSERT_TRUE(any.invoke("member"_hs, 42));
+    ASSERT_FALSE(any.invoke("non_existent"_hs, 42));
 
-	ASSERT_EQ(clazz_t::c, 'd');
-	ASSERT_EQ(instance.value, 42);
+    ASSERT_EQ(clazz_t::c, 'd');
+    ASSERT_EQ(instance.value, 42);
 }
 
 TEST_F(MetaAny, SetGet) {
     clazz_t instance;
     entt::meta_any any{std::ref(instance)};
 
-	ASSERT_TRUE(any.set("value"_hs, 42));
+    ASSERT_TRUE(any.set("value"_hs, 42));
 
     const auto value = any.get("value"_hs);
 
-	ASSERT_TRUE(value);
-	ASSERT_NE(value.try_cast<int>(), nullptr);
-	ASSERT_EQ(value.cast<int>(), 42);
+    ASSERT_TRUE(value);
+    ASSERT_NE(value.try_cast<int>(), nullptr);
+    ASSERT_EQ(value.cast<int>(), 42);
     ASSERT_EQ(instance.value, 42);
 
-	ASSERT_FALSE(any.set("non_existent"_hs, 42));
-	ASSERT_FALSE(any.get("non_existent"_hs));
+    ASSERT_FALSE(any.set("non_existent"_hs, 42));
+    ASSERT_FALSE(any.get("non_existent"_hs));
 }

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

@@ -347,10 +347,10 @@ TEST_F(MetaFunc, ExternalMemberFunction) {
 
     entt::registry registry;
     const auto entity = registry.create();
-    
+
     ASSERT_FALSE(registry.has<func_t>(entity));
-    
+
     func.invoke({}, std::ref(registry), entity);
-    
+
     ASSERT_TRUE(registry.has<func_t>(entity));
 }

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

@@ -94,4 +94,4 @@ TEST(MetaPointerLike, PointerToMoveOnlyType) {
 
     ASSERT_TRUE(any);
     ASSERT_FALSE(*any);
-}
+}