Browse Source

test: minor changes to suppress a bunch of warnings + formatting

Michele Caini 4 years ago
parent
commit
1ea392b6c9

+ 1 - 1
src/entt/meta/node.hpp

@@ -51,7 +51,7 @@ struct meta_prop_node {
 struct meta_base_node {
 struct meta_base_node {
     meta_base_node *next;
     meta_base_node *next;
     meta_type_node *const type;
     meta_type_node *const type;
-    meta_any(*const cast)(meta_any)ENTT_NOEXCEPT;
+    meta_any (*const cast)(meta_any) ENTT_NOEXCEPT;
 };
 };
 
 
 struct meta_conv_node {
 struct meta_conv_node {

+ 0 - 1
test/entt/core/any.cpp

@@ -1305,7 +1305,6 @@ TEST_F(Any, NotMovableType) {
         ASSERT_TRUE(copy.owner());
         ASSERT_TRUE(copy.owner());
     };
     };
 
 
-    const not_movable value{};
     test(entt::any{std::in_place_type<not_movable>}, entt::any{std::in_place_type<not_movable>});
     test(entt::any{std::in_place_type<not_movable>}, entt::any{std::in_place_type<not_movable>});
 }
 }
 
 

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

@@ -92,7 +92,7 @@ TEST(TypeInfo, Order) {
     entt::type_info lhs = entt::type_id<char>();
     entt::type_info lhs = entt::type_id<char>();
 
 
     // let's adjust the two objects since values are generated at runtime
     // let's adjust the two objects since values are generated at runtime
-    (rhs < lhs) || (std::swap(lhs, rhs), true);
+    rhs < lhs ? void() : std::swap(lhs, rhs);
 
 
     ASSERT_FALSE(lhs < lhs);
     ASSERT_FALSE(lhs < lhs);
     ASSERT_FALSE(rhs < rhs);
     ASSERT_FALSE(rhs < rhs);

+ 1 - 1
test/entt/process/scheduler.cpp

@@ -118,7 +118,7 @@ TEST(Scheduler, Functor) {
         reject();
         reject();
     };
     };
 
 
-    scheduler.attach(std::move(attach)).then(std::move(then)).then(std::move([](auto...) { FAIL(); }));
+    scheduler.attach(std::move(attach)).then(std::move(then)).then([](auto...) { FAIL(); });
 
 
     for(auto i = 0; i < 8; ++i) {
     for(auto i = 0; i < 8; ++i) {
         scheduler.update(0);
         scheduler.update(0);