From: Maxim Mamontov Date: Tue, 20 Sep 2011 13:46:22 +0000 (+0300) Subject: Move functor definition outside parent class X-Git-Tag: 2.408-rc1~1 X-Git-Url: https://git.stg.codes/stg.git/commitdiff_plain/45dadc36ce7759011b174a4597c55e899c9dfc04?hp=b5cf4044017adaad07d202d201e7276cfeb014b0 Move functor definition outside parent class --- diff --git a/projects/stargazer/plugins/authorization/inetaccess/inetaccess.h b/projects/stargazer/plugins/authorization/inetaccess/inetaccess.h index ad1c7fe7..1158955f 100644 --- a/projects/stargazer/plugins/authorization/inetaccess/inetaccess.h +++ b/projects/stargazer/plugins/authorization/inetaccess/inetaccess.h @@ -364,20 +364,21 @@ private: DEL_USER_NOTIFIER onDelUserNotifier; - class UnauthorizeUser : std::unary_function &, void> { - public: - UnauthorizeUser(AUTH_IA * a) : auth(a) {} - UnauthorizeUser(const UnauthorizeUser & rvalue) : auth(rvalue.auth) {} - void operator()(const std::pair & p) - { - auth->users->Unauthorize(p.second.user->GetLogin(), auth); - } - private: - UnauthorizeUser & operator=(const UnauthorizeUser & rvalue); - - AUTH_IA * auth; - }; - + friend class UnauthorizeUser; +}; +//----------------------------------------------------------------------------- +class UnauthorizeUser : std::unary_function &, void> { + public: + UnauthorizeUser(AUTH_IA * a) : auth(a) {} + UnauthorizeUser(const UnauthorizeUser & rvalue) : auth(rvalue.auth) {} + void operator()(const std::pair & p) + { + auth->users->Unauthorize(p.second.user->GetLogin(), auth); + } + private: + UnauthorizeUser & operator=(const UnauthorizeUser & rvalue); + + AUTH_IA * auth; }; //----------------------------------------------------------------------------- inline