diff options
Diffstat (limited to 'include/service.h')
-rw-r--r-- | include/service.h | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/include/service.h b/include/service.h index c5c5a5881..fd4163675 100644 --- a/include/service.h +++ b/include/service.h @@ -9,8 +9,7 @@ * Based on the original code of Services by Andy Church. */ -#ifndef SERVICE_H -#define SERVICE_H +#pragma once #include "services.h" #include "anope.h" @@ -113,7 +112,7 @@ class CoreExport Service : public virtual Base } }; -/** Like Reference, but used to refer to Services. +/** Like Reference, but used to refer to a Service. */ template<typename T> class ServiceReference : public Reference<T> @@ -122,7 +121,7 @@ class ServiceReference : public Reference<T> Anope::string name; public: - ServiceReference() { } + ServiceReference() = default; ServiceReference(const Anope::string &t, const Anope::string &n) : type(t), name(n) { @@ -138,7 +137,7 @@ class ServiceReference : public Reference<T> this->invalid = true; } - operator bool() anope_override + operator bool() override { if (this->invalid) { @@ -173,5 +172,3 @@ class ServiceAlias Service::DelAlias(t, f); } }; - -#endif // SERVICE_H |