Browse Source

registry: coding style

Michele Caini 2 years ago
parent
commit
a7120b3400
1 changed files with 4 additions and 4 deletions
  1. 4 4
      src/entt/entity/registry.hpp

+ 4 - 4
src/entt/entity/registry.hpp

@@ -944,7 +944,7 @@ public:
      */
      */
     template<typename... Type>
     template<typename... Type>
     void compact() {
     void compact() {
-        if constexpr(sizeof...(Type) == 0) {
+        if constexpr(sizeof...(Type) == 0u) {
             for(auto &&curr: pools) {
             for(auto &&curr: pools) {
                 curr.second->compact();
                 curr.second->compact();
             }
             }
@@ -1042,7 +1042,7 @@ public:
      */
      */
     template<typename... Type>
     template<typename... Type>
     [[nodiscard]] auto try_get([[maybe_unused]] const entity_type entt) const {
     [[nodiscard]] auto try_get([[maybe_unused]] const entity_type entt) const {
-        if constexpr(sizeof...(Type) == 1) {
+        if constexpr(sizeof...(Type) == 1u) {
             const auto &cpool = assure<std::remove_const_t<Type>...>();
             const auto &cpool = assure<std::remove_const_t<Type>...>();
             return cpool->contains(entt) ? std::addressof(cpool->get(entt)) : nullptr;
             return cpool->contains(entt) ? std::addressof(cpool->get(entt)) : nullptr;
         } else {
         } else {
@@ -1053,7 +1053,7 @@ public:
     /*! @copydoc try_get */
     /*! @copydoc try_get */
     template<typename... Type>
     template<typename... Type>
     [[nodiscard]] auto try_get([[maybe_unused]] const entity_type entt) {
     [[nodiscard]] auto try_get([[maybe_unused]] const entity_type entt) {
-        if constexpr(sizeof...(Type) == 1) {
+        if constexpr(sizeof...(Type) == 1u) {
             return (const_cast<Type *>(std::as_const(*this).template try_get<Type>(entt)), ...);
             return (const_cast<Type *>(std::as_const(*this).template try_get<Type>(entt)), ...);
         } else {
         } else {
             return std::make_tuple(try_get<Type>(entt)...);
             return std::make_tuple(try_get<Type>(entt)...);
@@ -1066,7 +1066,7 @@ public:
      */
      */
     template<typename... Type>
     template<typename... Type>
     void clear() {
     void clear() {
-        if constexpr(sizeof...(Type) == 0) {
+        if constexpr(sizeof...(Type) == 0u) {
             ENTT_ASSERT(!pools.empty() && (pools.begin()->second.get() == shortcut), "Misplaced entity pool");
             ENTT_ASSERT(!pools.empty() && (pools.begin()->second.get() == shortcut), "Misplaced entity pool");
 
 
             for(size_type pos = pools.size() - 1u; pos; --pos) {
             for(size_type pos = pools.size() - 1u; pos; --pos) {