@@ -67,11 +67,11 @@ struct SvEqual
6767#define ECSM_UNSUBSCRIBE_FROM_EVENT (name, func ) manager->unsubscribeFromEvent (name, std::bind(&func, this ))
6868
6969/* *
70- * @brief Subscribes @ref ecsm::System function to the event if exist .
70+ * @brief Subscribes @ref ecsm::System function to the event if exists .
7171 */
7272#define ECSM_TRY_SUBSCRIBE_TO_EVENT (name, func ) manager->trySubscribeToEvent (name, std::bind(&func, this ))
7373/* *
74- * @brief Unsubscribes @ref ecsm::System function from the event if exist .
74+ * @brief Unsubscribes @ref ecsm::System function from the event if exists .
7575 */
7676#define ECSM_TRY_UNSUBSCRIBE_FROM_EVENT (name, func ) manager->tryUnsubscribeFromEvent (name, std::bind(&func, this ))
7777
@@ -196,7 +196,7 @@ class Entity final
196196 uint32_t capacity = 0 ;
197197 uint32_t count = 0 ;
198198
199- inline static int compareComps (const void * a, const void * b) noexcept
199+ static int compareComps (const void * a, const void * b) noexcept
200200 {
201201 const auto l = (const ComponentData*)a;
202202 const auto r = (const ComponentData*)b;
@@ -210,8 +210,7 @@ class Entity final
210210 this ->capacity = capacity;
211211 if (this ->capacity == 0 )
212212 components = (ComponentData*)malloc (sizeof (ComponentData) * capacity);
213- else
214- components = (ComponentData*)realloc (components, sizeof (ComponentData) * capacity);
213+ else components = (ComponentData*)realloc (components, sizeof (ComponentData) * capacity);
215214 if (!components) abort ();
216215 }
217216 void addComponent (size_t type, System* system, ID<Component> instance)
@@ -425,13 +424,13 @@ class Manager final : public Singleton<Manager, false>
425424 }
426425
427426 /* *
428- * @brief Terminates and destroys system if exist .
427+ * @brief Terminates and destroys system if exists .
429428 * @param type target system typeid()
430429 * @return True if system is destroyed, otherwise false.
431430 */
432431 bool tryDestroySystem (std::type_index type);
433432 /* *
434- * @brief Terminates and destroys system if exist .
433+ * @brief Terminates and destroys system if exists .
435434 * @tparam T target system type
436435 * @return True if system is destroyed, otherwise false.
437436 */
@@ -469,7 +468,7 @@ class Manager final : public Singleton<Manager, false>
469468 * @brief Adds specified system to the system group.
470469 *
471470 * @tparam G type of the system group
472- * @tparam T target system type
471+ * @tparam S target system type
473472 *
474473 * @throw EcsmError if system is not found or already added.
475474 */
@@ -482,7 +481,7 @@ class Manager final : public Singleton<Manager, false>
482481 }
483482
484483 /* *
485- * @brief Adds specified system to the system group if exist .
484+ * @brief Adds specified system to the system group if exists .
486485 *
487486 * @param groupType typeid() of the system group
488487 * @param[in] system target system instance
@@ -491,7 +490,7 @@ class Manager final : public Singleton<Manager, false>
491490 */
492491 bool tryAddGroupSystem (std::type_index groupType, System* system);
493492 /* *
494- * @brief Adds specified system to the system group if exist .
493+ * @brief Adds specified system to the system group if exists .
495494 *
496495 * @tparam T type of the system group
497496 * @param[in] system target system instance
@@ -505,10 +504,10 @@ class Manager final : public Singleton<Manager, false>
505504 return tryAddGroupSystem (typeid (T), system);
506505 }
507506 /* *
508- * @brief Adds specified system to the system group if exist .
507+ * @brief Adds specified system to the system group if exists .
509508 *
510509 * @tparam G type of the system group
511- * @tparam T target system type
510+ * @tparam S target system type
512511 *
513512 * @return True if system is added to the group, otherwise false.
514513 */
@@ -550,7 +549,7 @@ class Manager final : public Singleton<Manager, false>
550549 * @brief Removes specified system from the system group.
551550 *
552551 * @tparam G type of the system group
553- * @tparam T target system type
552+ * @tparam S target system type
554553 *
555554 * @throw EcsmError if system or group is not found, or system is not added.
556555 */
@@ -563,7 +562,7 @@ class Manager final : public Singleton<Manager, false>
563562 }
564563
565564 /* *
566- * @brief Removes specified system from the system group if exist .
565+ * @brief Removes specified system from the system group if exists .
567566 *
568567 * @param groupType typeid() of the system group
569568 * @param[in] system target system instance
@@ -572,7 +571,7 @@ class Manager final : public Singleton<Manager, false>
572571 */
573572 bool tryRemoveGroupSystem (std::type_index groupType, System* system);
574573 /* *
575- * @brief Removes specified system from the system group if exist .
574+ * @brief Removes specified system from the system group if exists .
576575 *
577576 * @tparam T type of the system group
578577 * @param[in] system target system instance
@@ -586,10 +585,10 @@ class Manager final : public Singleton<Manager, false>
586585 return tryRemoveGroupSystem (typeid (T), system);
587586 }
588587 /* *
589- * @brief Removes specified system from the system group if exist .
588+ * @brief Removes specified system from the system group if exists .
590589 *
591590 * @tparam G type of the system group
592- * @tparam T target system type
591+ * @tparam S target system type
593592 *
594593 * @return True if system is removed from the group, otherwise false.
595594 */
@@ -637,7 +636,7 @@ class Manager final : public Singleton<Manager, false>
637636 const std::vector<System*>& getSystemGroup () const { return getSystemGroup (typeid (T)); }
638637
639638 /* *
640- * @brief Returns specified system group if exist , otherwise nullptr.
639+ * @brief Returns specified system group if exists , otherwise nullptr.
641640 * @param type target system group typeid()
642641 */
643642 const std::vector<System*>* tryGetSystemGroup (std::type_index type) const noexcept
@@ -648,7 +647,7 @@ class Manager final : public Singleton<Manager, false>
648647 return &result->second ;
649648 }
650649 /* *
651- * @brief Returns specified system group if exist , otherwise nullptr.
650+ * @brief Returns specified system group if exists , otherwise nullptr.
652651 * @tparam T target system group type
653652 */
654653 template <class T >
@@ -672,7 +671,7 @@ class Manager final : public Singleton<Manager, false>
672671
673672 /* *
674673 * @brief Returns system instance.
675- * @warning Be carefull with system pointer, it can be destroyed later.
674+ * @warning Be careful with system pointer, it can be destroyed later.
676675 * @param type target system typeid()
677676 * @throw EcsmError if system is not found.
678677 */
@@ -721,7 +720,7 @@ class Manager final : public Singleton<Manager, false>
721720 */
722721 ID<Entity> createEntity () { return entities.create (); }
723722 /* *
724- * @brief Destroys entity instance and it components.
723+ * @brief Destroys entity instance and its components.
725724 * @note Entities are not destroyed immediately, only after the dispose call.
726725 * @param[in,out] instance target entity instance or null
727726 */
@@ -922,7 +921,7 @@ class Manager final : public Singleton<Manager, false>
922921 }
923922
924923 /* ******************************************************************************************************************
925- * @brief Returns component data accessor if exist , otherwise null. (@ref OptView)
924+ * @brief Returns component data accessor if exists , otherwise null. (@ref OptView)
926925 * @warning Do not store views, use them only in place. Because component memory can be reallocated later.
927926 * @note It also checks for component in the garbage pool.
928927 *
@@ -938,7 +937,7 @@ class Manager final : public Singleton<Manager, false>
938937 return OptView<Component>(componentData->system ->getComponent (componentData->instance ));
939938 }
940939 /* *
941- * @brief Returns component data accessor if exist , otherwise null. (@ref OptView)
940+ * @brief Returns component data accessor if exists , otherwise null. (@ref OptView)
942941 * @warning Do not store views, use them only in place. Because component memory can be reallocated later.
943942 * @note It also checks for component in the garbage pool.
944943 *
@@ -953,7 +952,7 @@ class Manager final : public Singleton<Manager, false>
953952 }
954953
955954 /* *
956- * @brief Returns component data accessor if exist , otherwise creates a new one. (@ref View)
955+ * @brief Returns component data accessor if exists , otherwise creates a new one. (@ref View)
957956 * @warning Do not store views, use them only in place. Because component memory can be reallocated later.
958957 * @note It also checks for component in the garbage pool.
959958 *
@@ -968,7 +967,7 @@ class Manager final : public Singleton<Manager, false>
968967 return add (entity, componentType);
969968 }
970969 /* *
971- * @brief Returns component data accessor if exist , otherwise creates a new one. (@ref View)
970+ * @brief Returns component data accessor if exists , otherwise creates a new one. (@ref View)
972971 * @warning Do not store views, use them only in place. Because component memory can be reallocated later.
973972 * @note It also checks for component in the garbage pool.
974973 *
@@ -1062,7 +1061,7 @@ class Manager final : public Singleton<Manager, false>
10621061 */
10631062 uint32_t getComponentCount (ID<Entity> entity) const noexcept
10641063 {
1065- return ( uint32_t ) entities.get (entity)->getComponentCount ();
1064+ return entities.get (entity)->getComponentCount ();
10661065 }
10671066
10681067 /* *
@@ -1127,7 +1126,7 @@ class Manager final : public Singleton<Manager, false>
11271126
11281127 /* *
11291128 * @brief Resets entity component data, if added.
1130- * @return True if component exists and was resetted .
1129+ * @return True if component exists and was reset .
11311130 *
11321131 * @param entity target entity instance
11331132 * @param componentType target component typeid()
@@ -1146,7 +1145,7 @@ class Manager final : public Singleton<Manager, false>
11461145 }
11471146 /* *
11481147 * @brief Resets entity component data, if added.
1149- * @return True if component exists and was resetted .
1148+ * @return True if component exists and was reset .
11501149 *
11511150 * @param entity entity instance
11521151 * @param full reset all component data
@@ -1198,7 +1197,7 @@ class Manager final : public Singleton<Manager, false>
11981197 */
11991198 void unregisterEvent (std::string_view name);
12001199 /* *
1201- * @brief Unregisters event if exist .
1200+ * @brief Unregisters event if exists .
12021201 * @param name target event name
12031202 * @return True if event is unregistered, otherwise false.
12041203 */
@@ -1220,7 +1219,7 @@ class Manager final : public Singleton<Manager, false>
12201219 */
12211220 const Event& getEvent (std::string_view name) const ;
12221221 /* *
1223- * @brief Returns event data container by name if it exist , otherwise null.
1222+ * @brief Returns event data container by name if exists , otherwise null.
12241223 * @param name target event name
12251224 */
12261225 const Event* tryGetEvent (std::string_view name) const ;
@@ -1275,7 +1274,7 @@ class Manager final : public Singleton<Manager, false>
12751274 */
12761275 bool trySubscribeToEvent (std::string_view name, const std::function<void ()>& onEvent);
12771276 /* *
1278- * @brief Removes existing event subscriber if exist .
1277+ * @brief Removes existing event subscriber if exists .
12791278 *
12801279 * @param name target event name
12811280 * @param[in] onEvent on event function callback
@@ -1369,7 +1368,7 @@ class Manager final : public Singleton<Manager, false>
13691368 */
13701369 void lock () { locker.lock (); }
13711370 /* *
1372- * @brief Tries to locks manager for synchronous access. (MT-Safe)
1371+ * @brief Tries to lock manager for synchronous access. (MT-Safe)
13731372 * @note Use it if you want to access manager from multiple threads asynchronously.
13741373 */
13751374 bool tryLock () noexcept { return locker.try_lock (); }
0 commit comments