Michele Caini hace 8 años
padre
commit
02cf27091f

+ 1 - 1
src/entt/entity/actor.hpp

@@ -65,7 +65,7 @@ struct Actor {
      * @return A reference to the newly created component.
      */
     template<typename Component, typename... Args>
-    Component & set(Args&&... args) {
+    Component & set(Args &&... args) {
         return reg.template accomodate<Component>(entity, std::forward<Args>(args)...);
     }
 

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

@@ -57,7 +57,7 @@ class Registry {
         using test_fn_type = bool(Registry::*)(Entity) const;
 
         template<typename... Args>
-        Component & construct(Registry &registry, Entity entity, Args&&... args) {
+        Component & construct(Registry &registry, Entity entity, Args &&... args) {
             auto &component = SparseSet<Entity, Component>::construct(entity, std::forward<Args>(args)...);
 
             for(auto &&listener: listeners) {
@@ -351,7 +351,7 @@ public:
      * @return A valid entity identifier.
      */
     template<typename... Component>
-    entity_type create(Component&&... components) noexcept {
+    entity_type create(Component &&... components) noexcept {
         using accumulator_type = int[];
         const auto entity = create();
         accumulator_type accumulator = { 0, (ensure<std::decay_t<Component>>().construct(*this, entity, std::forward<Component>(components)), 0)... };
@@ -477,7 +477,7 @@ public:
      * @return A reference to the newly created tag.
      */
     template<typename Tag, typename... Args>
-    Tag & attach(entity_type entity, Args&&... args) {
+    Tag & attach(entity_type entity, Args &&... args) {
         assert(valid(entity));
         assert(!has<Tag>());
         const auto ttype = tag_family::type<Tag>();
@@ -591,7 +591,7 @@ public:
      * @return A reference to the newly created component.
      */
     template<typename Component, typename... Args>
-    Component & assign(entity_type entity, Args&&... args) {
+    Component & assign(entity_type entity, Args &&... args) {
         assert(valid(entity));
         return ensure<Component>().construct(*this, entity, std::forward<Args>(args)...);
     }
@@ -737,7 +737,7 @@ public:
      * @return A reference to the newly created component.
      */
     template<typename Component, typename... Args>
-    Component & replace(entity_type entity, Args&&... args) {
+    Component & replace(entity_type entity, Args &&... args) {
         assert(valid(entity));
         return (pool<Component>().get(entity) = Component{std::forward<Args>(args)...});
     }
@@ -770,7 +770,7 @@ public:
      * @return A reference to the newly created component.
      */
     template<typename Component, typename... Args>
-    Component & accomodate(entity_type entity, Args&&... args) {
+    Component & accomodate(entity_type entity, Args &&... args) {
         assert(valid(entity));
         auto &cpool = ensure<Component>();
 

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

@@ -529,7 +529,7 @@ public:
      */
     template<typename... Args>
     std::enable_if_t<std::is_constructible<Type, Args...>::value, object_type &>
-    construct(entity_type entity, Args&&... args) {
+    construct(entity_type entity, Args &&... args) {
         underlying_type::construct(entity);
         instances.emplace_back(std::forward<Args>(args)...);
         return instances.back();
@@ -557,7 +557,7 @@ public:
      */
     template<typename... Args>
     std::enable_if_t<!std::is_constructible<Type, Args...>::value, object_type &>
-    construct(entity_type entity, Args&&... args) {
+    construct(entity_type entity, Args &&... args) {
         underlying_type::construct(entity);
         instances.emplace_back(Type{std::forward<Args>(args)...});
         return instances.back();

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

@@ -82,7 +82,7 @@ public:
      * @param view Shared reference to a dedicated pool of entities.
      * @param pools References to pools of components.
      */
-    PersistentView(view_type &view, pool_type<Component>&... pools) noexcept
+    PersistentView(view_type &view, pool_type<Component> &... pools) noexcept
         : view{view}, pools{pools...}
     {}
 
@@ -425,7 +425,7 @@ public:
      * @brief Constructs a view out of a bunch of pools of components.
      * @param pools References to pools of components.
      */
-    View(pool_type<Component>&... pools) noexcept
+    View(pool_type<Component> &... pools) noexcept
         : pools{pools...}, view{nullptr}, unchecked{}
     {
         reset();

+ 1 - 1
src/entt/locator/locator.hpp

@@ -78,7 +78,7 @@ struct ServiceLocator final {
      * @param args Parameters to use to construct the service.
      */
     template<typename Impl = Service, typename... Args>
-    inline static void set(Args&&... args) {
+    inline static void set(Args &&... args) {
         service = std::make_shared<Impl>(std::forward<Args>(args)...);
     }
 

+ 2 - 2
src/entt/process/process.hpp

@@ -109,7 +109,7 @@ class Process {
     }
 
     template<State S, typename... Args>
-    void tick(char, tag<S>, Args&&...) {}
+    void tick(char, tag<S>, Args &&...) {}
 
 protected:
     /**
@@ -312,7 +312,7 @@ struct ProcessAdaptor: Process<ProcessAdaptor<Func, Delta>, Delta>, private Func
      * @param args Parameters to use to initialize the actual process.
      */
     template<typename... Args>
-    ProcessAdaptor(Args&&... args)
+    ProcessAdaptor(Args &&... args)
         : Func{std::forward<Args>(args)...}
     {}
 

+ 2 - 2
src/entt/process/scheduler.hpp

@@ -64,7 +64,7 @@ class Scheduler final {
         {}
 
         template<typename Proc, typename... Args>
-        decltype(auto) then(Args&&... args) && {
+        decltype(auto) then(Args &&... args) && {
             static_assert(std::is_base_of<Process<Proc, Delta>, Proc>::value, "!");
             handler = Lambda::operator()(handler, tag<Proc>{}, std::forward<Args>(args)...);
             return std::move(*this);
@@ -194,7 +194,7 @@ public:
      * @return An opaque object to use to concatenate processes.
      */
     template<typename Proc, typename... Args>
-    auto attach(Args&&... args) {
+    auto attach(Args &&... args) {
         static_assert(std::is_base_of<Process<Proc, Delta>, Proc>::value, "!");
 
         auto proc = typename ProcessHandler::instance_type{new Proc{std::forward<Args>(args)...}, &Scheduler::deleter<Proc>};

+ 3 - 3
src/entt/resource/cache.hpp

@@ -92,7 +92,7 @@ public:
      * @return True if the resource is ready to use, false otherwise.
      */
     template<typename Loader, typename... Args>
-    bool load(resource_type id, Args&&... args) {
+    bool load(resource_type id, Args &&... args) {
         static_assert(std::is_base_of<ResourceLoader<Loader, Resource>, Loader>::value, "!");
 
         bool loaded = true;
@@ -125,7 +125,7 @@ public:
      * @return True if the resource is ready to use, false otherwise.
      */
     template<typename Loader, typename... Args>
-    bool reload(resource_type id, Args&&... args) {
+    bool reload(resource_type id, Args &&... args) {
         return (discard(id), load<Loader>(id, std::forward<Args>(args)...));
     }
 
@@ -142,7 +142,7 @@ public:
      * @return A handle for the given resource.
      */
     template<typename Loader, typename... Args>
-    ResourceHandle<Resource> temp(Args&&... args) const {
+    ResourceHandle<Resource> temp(Args &&... args) const {
         return { Loader{}.get(std::forward<Args>(args)...) };
     }
 

+ 1 - 1
src/entt/resource/loader.hpp

@@ -50,7 +50,7 @@ class ResourceLoader {
     friend class ResourceCache<Resource>;
 
     template<typename... Args>
-    std::shared_ptr<Resource> get(Args&&... args) const {
+    std::shared_ptr<Resource> get(Args &&... args) const {
         return static_cast<const Loader *>(this)->load(std::forward<Args>(args)...);
     }
 };

+ 2 - 2
src/entt/signal/bus.hpp

@@ -142,7 +142,7 @@ public:
      * @param args Arguments to use to construct the event.
      */
     template<typename Type, typename... Args>
-    void publish(Args&&... args) {
+    void publish(Args &&... args) {
         Bus<Sig, Type>::publish(std::forward<Args>(args)...);
     }
 };
@@ -263,7 +263,7 @@ public:
      * @param args Arguments to use to construct the event.
      */
     template<typename... Args>
-    void publish(Args&&... args) {
+    void publish(Args &&... args) {
         signal.publish({ std::forward<Args>(args)... });
     }
 

+ 4 - 4
src/entt/signal/dispatcher.hpp

@@ -59,12 +59,12 @@ class Dispatcher final {
         }
 
         template<typename... Args>
-        inline void trigger(Args&&... args) {
+        inline void trigger(Args &&... args) {
             signal.publish({ std::forward<Args>(args)... });
         }
 
         template<typename... Args>
-        inline void enqueue(std::size_t current, Args&&... args) {
+        inline void enqueue(std::size_t current, Args &&... args) {
             events[current].push_back({ std::forward<Args>(args)... });
         }
 
@@ -151,7 +151,7 @@ public:
      * @param args Arguments to use to construct the event.
      */
     template<typename Event, typename... Args>
-    void trigger(Args&&... args) {
+    void trigger(Args &&... args) {
         wrapper<Event>().trigger(std::forward<Args>(args)...);
     }
 
@@ -166,7 +166,7 @@ public:
      * @param args Arguments to use to construct the event.
      */
     template<typename Event, typename... Args>
-    void enqueue(Args&&... args) {
+    void enqueue(Args &&... args) {
         wrapper<Event>().enqueue(buffer(mode), std::forward<Args>(args)...);
     }
 

+ 1 - 1
src/entt/signal/emitter.hpp

@@ -215,7 +215,7 @@ public:
      * @param args Parameters to use to initialize the event.
      */
     template<typename Event, typename... Args>
-    void publish(Args&&... args) {
+    void publish(Args &&... args) {
         handler<Event>().publish({ std::forward<Args>(args)... }, *static_cast<Derived *>(this));
     }