diff options
| author | 2020-11-03 14:48:54 +0000 | |
|---|---|---|
| committer | 2020-11-03 19:54:13 +0000 | |
| commit | 89a21202de35eeec8ef464ada5e9fbb97fd83ba5 (patch) | |
| tree | b70c242c58bae562bef1d42c34c9d5d628d81208 /include/users.h | |
| parent | Clean up a bunch of contructors and destructors. (diff) | |
Convert ConnectClass from reference<> to std::shared_ptr<>.
Diffstat (limited to 'include/users.h')
| -rw-r--r-- | include/users.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/include/users.h b/include/users.h index e58b18d16..9cb07f7e2 100644 --- a/include/users.h +++ b/include/users.h @@ -72,7 +72,7 @@ enum UserType { /** Holds information relevant to <connect allow> and <connect deny> tags in the config file. */ -struct CoreExport ConnectClass : public refcountbase +struct CoreExport ConnectClass { std::shared_ptr<ConfigTag> config; /** Type of line, either CC_ALLOW or CC_DENY @@ -160,10 +160,10 @@ struct CoreExport ConnectClass : public refcountbase ConnectClass(std::shared_ptr<ConfigTag> tag, char type, const std::string& mask); /** Create a new connect class with inherited settings. */ - ConnectClass(std::shared_ptr<ConfigTag> tag, char type, const std::string& mask, const ConnectClass& parent); + ConnectClass(std::shared_ptr<ConfigTag> tag, char type, const std::string& mask, std::shared_ptr<ConnectClass> parent); /** Update the settings in this block to match the given block */ - void Update(const ConnectClass* newSettings); + void Update(const std::shared_ptr<ConnectClass> newSettings); const std::string& GetName() { return name; } const std::string& GetHost() { return host; } @@ -707,12 +707,12 @@ class CoreExport LocalUser : public User, public insp::intrusive_list_node<Local /** Contains a pointer to the connect class a user is on from */ - reference<ConnectClass> MyClass; + std::shared_ptr<ConnectClass> MyClass; /** Get the connect class which this user belongs to. * @return A pointer to this user's connect class. */ - ConnectClass* GetClass() const { return MyClass; } + std::shared_ptr<ConnectClass> GetClass() const { return MyClass; } /** Call this method to find the matching \<connect> for a user, and to check them against it. */ |
