X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/c3d4d096451b5c683492e81574b302e5486950e1..0907aa4037b12b6b88ee24495d4577a064d4f8db:/projects/stargazer/actions.inl.h 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