From 8475697e3b9154a018f9bba59e93366a8f835100 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Wed, 21 Feb 2024 15:39:40 +0000 Subject: [PATCH] Inline, constify, and document GetProtocolName. --- include/protocol.h | 4 +++- src/protocol.cpp | 5 ----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/include/protocol.h b/include/protocol.h index e33640e77..70e45837e 100644 --- a/include/protocol.h +++ b/include/protocol.h @@ -25,6 +25,9 @@ class CoreExport IRCDProto protected: IRCDProto(Module *creator, const Anope::string &proto_name); public: + /** Retrieves the protocol name. */ + const Anope::string &GetProtocolName() const { return proto_name; } + virtual ~IRCDProto(); virtual void SendSVSKillInternal(const MessageSource &, User *, const Anope::string &); @@ -39,7 +42,6 @@ public: virtual void SendCTCPInternal(const MessageSource &, const Anope::string &dest, const Anope::string &buf); virtual void SendNumericInternal(int numeric, const Anope::string &dest, const Anope::string &buf); - const Anope::string &GetProtocolName(); virtual bool Parse(const Anope::string &, Anope::map &, Anope::string &, Anope::string &, std::vector &); virtual Anope::string Format(const Anope::string &source, const Anope::string &message); diff --git a/src/protocol.cpp b/src/protocol.cpp index 87efc7894..5630c3e34 100644 --- a/src/protocol.cpp +++ b/src/protocol.cpp @@ -35,11 +35,6 @@ IRCDProto::~IRCDProto() IRCD = NULL; } -const Anope::string &IRCDProto::GetProtocolName() -{ - return this->proto_name; -} - static inline char nextID(int pos, Anope::string &buf) { char &c = buf[pos];