X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/8569ecdc2c9368dc0fe650b901cce7b37337ffec..a500fb72810060e52d87ad2c2e4691531f0bcc5a:/projects/stargazer/actions.h diff --git a/projects/stargazer/actions.h b/projects/stargazer/actions.h index 66b8556d..33c9a8fd 100644 --- a/projects/stargazer/actions.h +++ b/projects/stargazer/actions.h @@ -13,9 +13,9 @@ // // actionsList.InvokeAll(); -#include -#include +#include #include +#include // Generalized actor type - a method of some class with one argument template @@ -42,7 +42,7 @@ public: typename ACTOR::TYPE a, DATA_TYPE d) : activeClass(ac), actor(a), data(d) {} - void Invoke(); + void Invoke() override; private: ACTION(const ACTION & rvalue); ACTION & operator=(const ACTION & rvalue); @@ -54,11 +54,11 @@ private: // A list of an actions // All methods are thread-safe -class ACTIONS_LIST : private std::list +class ACTIONS_LIST : private std::vector { public: // Just a typedef for parent class - typedef std::list parent; + typedef std::vector parent; // Initialize mutex ACTIONS_LIST(); @@ -82,7 +82,7 @@ public: // Invoke all actions in the list void InvokeAll(); private: - mutable pthread_mutex_t mutex; + mutable std::mutex m_mutex; }; #include "actions.inl.h"