Преглед изворни кода

storage: no fwd ref, no NOLINT

skypjack пре 3 дана
родитељ
комит
e099db8e15
1 измењених фајлова са 2 додато и 8 уклоњено
  1. 2 8
      src/entt/entity/storage.hpp

+ 2 - 8
src/entt/entity/storage.hpp

@@ -889,12 +889,9 @@ public:
      * Attempting to use an entity that already belongs to the storage results
      * in undefined behavior.
      *
-     * @tparam Args Types of arguments to use to construct the object.
      * @param entt A valid identifier.
      */
-    template<typename... Args>
-    // NOLINTNEXTLINE(cppcoreguidelines-missing-std-forward)
-    auto emplace(const entity_type entt, Args &&...) {
+    auto emplace(const entity_type entt, const auto &...) {
         base_type::try_emplace(entt, false);
     }
 
@@ -912,13 +909,10 @@ public:
 
     /**
      * @brief Assigns entities to a storage.
-     * @tparam Args Types of optional arguments.
      * @param first An iterator to the first element of the range of entities.
      * @param last An iterator past the last element of the range of entities.
      */
-    template<typename... Args>
-    // NOLINTNEXTLINE(cppcoreguidelines-missing-std-forward)
-    void insert(stl::input_iterator auto first, stl::input_iterator auto last, Args &&...) {
+    void insert(stl::input_iterator auto first, stl::input_iterator auto last, const auto &...) {
         for(; first != last; ++first) {
             base_type::try_emplace(*first, true);
         }