diff options
author | Sadie Powell <sadie@witchery.services> | 2024-01-23 15:28:23 +0000 |
---|---|---|
committer | Sadie Powell <sadie@witchery.services> | 2024-01-23 15:28:23 +0000 |
commit | a6a0f6c44780c839b2269f4f29a26ecfdbd95544 (patch) | |
tree | d4d1fded5c14350eb003a665ca8de500a0440cea /modules/m_dns.cpp | |
parent | 398d674cf40c0dba4e4cd2edd0f325ace15128c2 (diff) |
Improve the layout of types that inherit from another type.
Diffstat (limited to 'modules/m_dns.cpp')
-rw-r--r-- | modules/m_dns.cpp | 27 |
1 files changed, 19 insertions, 8 deletions
diff --git a/modules/m_dns.cpp b/modules/m_dns.cpp index 47f6a5a3f..57783cbe0 100644 --- a/modules/m_dns.cpp +++ b/modules/m_dns.cpp @@ -23,7 +23,8 @@ namespace /** A full packet sent or received to/from the nameserver */ -class Packet : public Query +class Packet + : public Query { static bool IsValidName(const Anope::string &name) { @@ -448,7 +449,8 @@ public: namespace DNS { - class ReplySocket : public virtual Socket + class ReplySocket + : public virtual Socket { public: ~ReplySocket() override = default; @@ -457,13 +459,17 @@ namespace DNS } /* Listens for TCP requests */ -class TCPSocket : public ListenSocket +class TCPSocket + : public ListenSocket { Manager *manager; public: /* A TCP client */ - class Client : public ClientSocket, public Timer, public ReplySocket + class Client + : public ClientSocket + , public Timer + , public ReplySocket { Manager *manager; Packet *packet = nullptr; @@ -550,7 +556,8 @@ public: }; /* Listens for UDP requests */ -class UDPSocket : public ReplySocket +class UDPSocket + : public ReplySocket { Manager *manager; std::deque<Packet *> packets; @@ -610,7 +617,8 @@ public: } }; -class NotifySocket : public Socket +class NotifySocket + : public Socket { Packet *packet; public: @@ -643,7 +651,9 @@ public: } }; -class MyManager : public Manager, public Timer +class MyManager + : public Manager + , public Timer { uint32_t serial; @@ -997,7 +1007,8 @@ private: }; -class ModuleDNS : public Module +class ModuleDNS + : public Module { MyManager manager; |