Explorar el Código

view: minor changes

Michele Caini hace 3 años
padre
commit
a5e259c19b
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  1. 2 2
      src/entt/entity/view.hpp

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

@@ -740,7 +740,7 @@ public:
      * otherwise.
      * otherwise.
      */
      */
     [[nodiscard]] entity_type front() const noexcept {
     [[nodiscard]] entity_type front() const noexcept {
-        return (!view || view->empty()) ? null : *view->begin();
+        return empty() ? null : *view->begin();
     }
     }
 
 
     /**
     /**
@@ -749,7 +749,7 @@ public:
      * otherwise.
      * otherwise.
      */
      */
     [[nodiscard]] entity_type back() const noexcept {
     [[nodiscard]] entity_type back() const noexcept {
-        return (!view || view->empty()) ? null : *view->rbegin();
+        return empty() ? null : *view->rbegin();
     }
     }
 
 
     /**
     /**