diff options
| author | 2021-04-09 01:03:30 +0100 | |
|---|---|---|
| committer | 2021-04-09 01:03:30 +0100 | |
| commit | ee643ad2a5e8a1d964e43f9935836daec4995934 (patch) | |
| tree | 1f10a5d185a3137ccdc10b4ed9149ebf50acbdee /include | |
| parent | Remove usecountbase from ExtensionItem and refer to using pointers. (diff) | |
Migrate IOHookProvider from reference<> to std::shared_ptr<>.
Diffstat (limited to 'include')
| -rw-r--r-- | include/iohook.h | 10 | ||||
| -rw-r--r-- | include/modules/ssl.h | 2 |
2 files changed, 7 insertions, 5 deletions
diff --git a/include/iohook.h b/include/iohook.h index 986a5ba1f..83d752620 100644 --- a/include/iohook.h +++ b/include/iohook.h @@ -22,7 +22,9 @@ class StreamSocket; -class IOHookProvider : public refcountbase, public ServiceProvider +class IOHookProvider + : public std::enable_shared_from_this<IOHookProvider> + , public ServiceProvider { const bool middlehook; @@ -70,12 +72,12 @@ class IOHook : public Cullable /** The IOHookProvider for this hook, contains information about the hook, * such as the module providing it and the hook type. */ - reference<IOHookProvider> prov; + std::shared_ptr<IOHookProvider> prov; /** Constructor * @param provider IOHookProvider that creates this object */ - IOHook(IOHookProvider* provider) + IOHook(std::shared_ptr<IOHookProvider> provider) : prov(provider) { } /** @@ -132,7 +134,7 @@ class IOHookMiddle : public IOHook /** Constructor * @param provider IOHookProvider that creates this object */ - IOHookMiddle(IOHookProvider* provider) + IOHookMiddle(std::shared_ptr<IOHookProvider> provider) : IOHook(provider) { } diff --git a/include/modules/ssl.h b/include/modules/ssl.h index 5aef29705..72f45bf69 100644 --- a/include/modules/ssl.h +++ b/include/modules/ssl.h @@ -204,7 +204,7 @@ class SSLIOHook : public IOHook return NULL; } - SSLIOHook(IOHookProvider* hookprov) + SSLIOHook(std::shared_ptr<IOHookProvider> hookprov) : IOHook(hookprov) { } |
