X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/46b0747592074017ff0ea4b33d4a7194235886e5..bf689f8729a4f53f9425da557e0919eb9a6d795b:/stargazer/actions.inl.h?ds=inline diff --git a/stargazer/actions.inl.h b/stargazer/actions.inl.h index b5b3f8a5..1b713f1d 100644 --- a/stargazer/actions.inl.h +++ b/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