X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/dda964a76b486001f0debf38deb594ad7c13f416..51998949e60e2a7e86e4393b315cfb76a58ca80d:/projects/stargazer/actions.inl.h?ds=inline diff --git a/projects/stargazer/actions.inl.h b/projects/stargazer/actions.inl.h index b5b3f8a5..1b713f1d 100644 --- a/projects/stargazer/actions.inl.h +++ b/projects/stargazer/actions.inl.h @@ -29,7 +29,7 @@ ACTIONS_LIST::~ACTIONS_LIST() STG_LOCKER lock(&mutex); parent::iterator it(parent::begin()); - while (it != parent::end()) + while (it != parent::end()) { delete *it++; } @@ -40,28 +40,28 @@ pthread_mutex_destroy(&mutex); inline ACTIONS_LIST::parent::iterator ACTIONS_LIST::begin() -{ +{ STG_LOCKER lock(&mutex); return parent::begin(); } inline ACTIONS_LIST::parent::iterator ACTIONS_LIST::end() -{ +{ STG_LOCKER lock(&mutex); return parent::end(); } inline ACTIONS_LIST::parent::const_iterator ACTIONS_LIST::begin() const -{ +{ STG_LOCKER lock(&mutex); return parent::begin(); } inline ACTIONS_LIST::parent::const_iterator ACTIONS_LIST::end() const -{ +{ STG_LOCKER lock(&mutex); return parent::end(); } @@ -104,8 +104,7 @@ STG_LOCKER lock(&mutex); std::for_each( parent::begin(), parent::end(), - std::mem_fun(&BASE_ACTION::Invoke) -); + [](auto action){ action->Invoke(); }); } #endif