From 45dadc36ce7759011b174a4597c55e899c9dfc04 Mon Sep 17 00:00:00 2001 From: Maxim Mamontov Date: Tue, 20 Sep 2011 16:46:22 +0300 Subject: [PATCH] Move functor definition outside parent class --- .../authorization/inetaccess/inetaccess.h | 29 ++++++++++--------- 1 file changed, 15 insertions(+), 14 deletions(-) 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 -- 2.44.2