Browse Source

doc: avoid warnings and errors by doxygen

Michele Caini 2 years ago
parent
commit
719c233e77
1 changed files with 10 additions and 5 deletions
  1. 10 5
      src/entt/entity/view.hpp

+ 10 - 5
src/entt/entity/view.hpp

@@ -789,7 +789,7 @@ public:
 
     /**
      * @brief Returns the component assigned to the given entity.
-     * @tparam Elem Type or index of the component to get.
+     * @tparam Elem Type of the component to get.
      * @param entt A valid identifier.
      * @return The component assigned to the entity.
      */
@@ -799,13 +799,18 @@ public:
         return get<0>(entt);
     }
 
-    /*! @copydoc get */
-    template<std::size_t... Elem>
+    /**
+     * @brief Returns the component assigned to the given entity.
+     * @tparam Index Index of the component to get.
+     * @param entt A valid identifier.
+     * @return The component assigned to the entity.
+     */
+    template<std::size_t... Index>
     [[nodiscard]] decltype(auto) get(const entity_type entt) const {
-        if constexpr(sizeof...(Elem) == 0) {
+        if constexpr(sizeof...(Index) == 0) {
             return storage()->get_as_tuple(entt);
         } else {
-            return storage<Elem...>()->get(entt);
+            return storage<Index...>()->get(entt);
         }
     }