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

test: use entt::to_integral instead of std::underlying_type_t for entity identifiers

Michele Caini 5 лет назад
Родитель
Сommit
804cfb7482
2 измененных файлов с 2 добавлено и 2 удалено
  1. 1 1
      test/entt/entity/group.cpp
  2. 1 1
      test/entt/entity/sparse_set.cpp

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

@@ -197,7 +197,7 @@ TEST(NonOwningGroup, Sort) {
     ASSERT_EQ(*(group.data() + 2u), e2);
 
     group.sort([](const entt::entity lhs, const entt::entity rhs) {
-        return std::underlying_type_t<entt::entity>(lhs) < std::underlying_type_t<entt::entity>(rhs);
+        return entt::to_integral(lhs) < entt::to_integral(rhs);
     });
 
     ASSERT_EQ(*(group.raw<unsigned int>() + 0u), 0u);

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

@@ -74,7 +74,7 @@ TEST(SparseSet, Functionalities) {
 
 TEST(SparseSet, Pagination) {
     entt::sparse_set<entt::entity> set;
-    constexpr auto entt_per_page = ENTT_PAGE_SIZE / sizeof(std::underlying_type_t<entt::entity>);
+    constexpr auto entt_per_page = ENTT_PAGE_SIZE / sizeof(entt::entity);
 
     ASSERT_EQ(set.extent(), 0);