]> git.stg.codes - stg.git/blobdiff - projects/stargazer/plugins/authorization/ao/ao.h
Various fixes of issues reported by static analyzers.
[stg.git] / projects / stargazer / plugins / authorization / ao / ao.h
index 205ebf5a841a5eded5e9d1bc40d86faa8c2ce9da..bf1cbe6be83188e81cddf48d958f6fb73379cdbd 100644 (file)
@@ -37,6 +37,7 @@
 #include "stg/notifer.h"
 #include "stg/user_ips.h"
 #include "stg/user.h"
+#include "stg/logger.h"
 
 extern "C" PLUGIN * GetPlugin();
 
@@ -82,18 +83,18 @@ private:
 class AUTH_AO : public AUTH {
 public:
     AUTH_AO();
-    virtual ~AUTH_AO(){};
+    virtual ~AUTH_AO(){}
 
     void                SetUsers(USERS * u) { users = u; }
 
     int                 Start();
     int                 Stop();
-    int                 Reload() { return 0; }
+    int                 Reload(const MODULE_SETTINGS & /*ms*/) { return 0; }
     bool                IsRunning() { return isRunning; }
     void                SetSettings(const MODULE_SETTINGS &) {}
     int                 ParseSettings() { return 0; }
     const std::string & GetStrError() const { return errorStr; }
-    const std::string   GetVersion() const;
+    std::string         GetVersion() const;
     uint16_t            GetStartPosition() const { return 30; }
     uint16_t            GetStopPosition() const { return 30; }
 
@@ -117,15 +118,15 @@ private:
     bool                isRunning;
     MODULE_SETTINGS     settings;
 
-    list<CHG_BEFORE_NOTIFIER<int> >      BeforeChgAONotifierList;
-    list<CHG_AFTER_NOTIFIER<int> >       AfterChgAONotifierList;
+    std::list<CHG_BEFORE_NOTIFIER<int> >      BeforeChgAONotifierList;
+    std::list<CHG_AFTER_NOTIFIER<int> >       AfterChgAONotifierList;
 
-    list<CHG_BEFORE_NOTIFIER<USER_IPS> > BeforeChgIPNotifierList;
-    list<CHG_AFTER_NOTIFIER<USER_IPS> >  AfterChgIPNotifierList;
+    std::list<CHG_BEFORE_NOTIFIER<USER_IPS> > BeforeChgIPNotifierList;
+    std::list<CHG_AFTER_NOTIFIER<USER_IPS> >  AfterChgIPNotifierList;
 
     class ADD_USER_NONIFIER: public NOTIFIER_BASE<USER_PTR> {
     public:
-        ADD_USER_NONIFIER(AUTH_AO & a) : auth(a) {}
+        explicit ADD_USER_NONIFIER(AUTH_AO & a) : auth(a) {}
         virtual ~ADD_USER_NONIFIER() {}
         void Notify(const USER_PTR & user) { auth.AddUser(user); }
 
@@ -138,7 +139,7 @@ private:
 
     class DEL_USER_NONIFIER: public NOTIFIER_BASE<USER_PTR> {
     public:
-        DEL_USER_NONIFIER(AUTH_AO & a) : auth(a) {}
+        explicit DEL_USER_NONIFIER(AUTH_AO & a) : auth(a) {}
         virtual ~DEL_USER_NONIFIER() {}
         void Notify(const USER_PTR & user) { auth.DelUser(user); }
 
@@ -148,6 +149,7 @@ private:
 
         AUTH_AO & auth;
     } onDelUserNotifier;
+    PLUGIN_LOGGER logger;
 
     friend class CHG_BEFORE_NOTIFIER<int>;
     friend class CHG_AFTER_NOTIFIER<int>;