]> git.stg.codes - stg.git/commitdiff
Move functor definition outside parent class
authorMaxim Mamontov <faust.madf@gmail.com>
Tue, 20 Sep 2011 13:46:22 +0000 (16:46 +0300)
committerMaxim Mamontov <faust.madf@gmail.com>
Tue, 20 Sep 2011 13:46:22 +0000 (16:46 +0300)
projects/stargazer/plugins/authorization/inetaccess/inetaccess.h

index ad1c7fe7352c163c5139f55dbc7ff83f11a4a6dc..1158955fd55fe47333efb17c5cdcbb28f62193d3 100644 (file)
@@ -364,20 +364,21 @@ private:
 
     DEL_USER_NOTIFIER   onDelUserNotifier;
 
-    class UnauthorizeUser : std::unary_function<const std::pair<uint32_t, IA_USER> &, void> {
-        public:
-            UnauthorizeUser(AUTH_IA * a) : auth(a) {}
-            UnauthorizeUser(const UnauthorizeUser & rvalue) : auth(rvalue.auth) {}
-            void operator()(const std::pair<uint32_t, IA_USER> & 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<const std::pair<uint32_t, IA_USER> &, void> {
+    public:
+        UnauthorizeUser(AUTH_IA * a) : auth(a) {}
+        UnauthorizeUser(const UnauthorizeUser & rvalue) : auth(rvalue.auth) {}
+        void operator()(const std::pair<uint32_t, IA_USER> & p)
+        {
+            auth->users->Unauthorize(p.second.user->GetLogin(), auth);
+        }
+    private:
+        UnauthorizeUser & operator=(const UnauthorizeUser & rvalue);
+
+        AUTH_IA * auth;
 };
 //-----------------------------------------------------------------------------
 inline