diff --git a/include/language.h b/include/language.h index 7762dd8a8..beed9046b 100644 --- a/include/language.h +++ b/include/language.h @@ -44,7 +44,7 @@ namespace Language /** Sets the locale to the specified language. * @param lang The language to translate to. */ - extern CoreExport void SetLocale(const char* lang); + extern CoreExport void SetLocale(const char *lang); /** Sets the locale back to the default. */ extern CoreExport void ResetLocale(); diff --git a/include/modules/global/service.h b/include/modules/global/service.h index 061e85f82..d0dacd5b9 100644 --- a/include/modules/global/service.h +++ b/include/modules/global/service.h @@ -46,7 +46,7 @@ public: /** Retrieves the size of the messages queue for the specified user. * @param nc The account to count queued messages for. */ - inline size_t CountQueue(NickCore* nc) const + inline size_t CountQueue(NickCore *nc) const { auto *q = GetQueue(nc); return q ? q->size() : 0; @@ -55,7 +55,7 @@ public: /** Retrieves the messages queue for the specified user. * @param nc The account to retrieve queued messages for. */ - virtual const std::vector *GetQueue(NickCore* nc) const = 0; + virtual const std::vector *GetQueue(NickCore *nc) const = 0; /** Queues a message to be sent later. * @param nc The account to queue the message for. diff --git a/include/modules/rpc.h b/include/modules/rpc.h index cc4a04bf3..a63b75056 100644 --- a/include/modules/rpc.h +++ b/include/modules/rpc.h @@ -183,7 +183,7 @@ private: size_t minparams; protected: - Event(Module *o, const Anope::string& e, size_t mp = 0) + Event(Module *o, const Anope::string &e, size_t mp = 0) : Service(o, RPC_EVENT, e) , minparams(mp) { diff --git a/include/protocol.h b/include/protocol.h index 07da69275..57a696b74 100644 --- a/include/protocol.h +++ b/include/protocol.h @@ -307,7 +307,7 @@ public: */ virtual void SendOper(User *u); - virtual void SendClearModes(const MessageSource &user, Channel *c, User* u, const Anope::string &mode) { } + virtual void SendClearModes(const MessageSource &user, Channel *c, User *u, const Anope::string &mode) { } virtual bool IsNickValid(const Anope::string &); virtual bool IsChannelValid(const Anope::string &); diff --git a/include/serialize.h b/include/serialize.h index aa5a56270..c603d552a 100644 --- a/include/serialize.h +++ b/include/serialize.h @@ -152,7 +152,7 @@ public: * @param def The default value if none is set. */ template - T Load(const Anope::string& key, T def = T()) + T Load(const Anope::string &key, T def = T()) { T out; if (!TryLoad(key, out)) @@ -186,7 +186,7 @@ public: * @param out The location to store the retrieved value. */ template - bool TryLoad(const Anope::string& key, T &out) + bool TryLoad(const Anope::string &key, T &out) { Anope::string out_str; if (!LoadInternal(key, out_str)) diff --git a/include/service.h b/include/service.h index 082a35d33..ad29ef4bd 100644 --- a/include/service.h +++ b/include/service.h @@ -151,14 +151,14 @@ public: const auto &GetServiceType() const { return type; } /** Invalidates the reference and changes the name of the referenced service. */ - void SetServiceName(const Anope::string& newname) + void SetServiceName(const Anope::string &newname) { this->invalid = true; this->name = newname; } /** Invalidates the reference and changes the type of the referenced service. */ - void SetServiceType(const Anope::string& newtype) + void SetServiceType(const Anope::string &newtype) { this->invalid = true; this->type = newtype; diff --git a/modules/chanserv/chanserv.cpp b/modules/chanserv/chanserv.cpp index 4948389b3..9b4a490a5 100644 --- a/modules/chanserv/chanserv.cpp +++ b/modules/chanserv/chanserv.cpp @@ -397,11 +397,10 @@ public: return EVENT_CONTINUE; } - void OnUplinkSync(Server* s) override + void OnUplinkSync(Server *s) override { // We need to do this when the uplink is synced as we may not know if // the mode exists before then on some IRCds (e.g. InspIRCd). - if (!persist) return; diff --git a/modules/chanserv/cs_access.cpp b/modules/chanserv/cs_access.cpp index ba77782d7..3e087adf8 100644 --- a/modules/chanserv/cs_access.cpp +++ b/modules/chanserv/cs_access.cpp @@ -440,7 +440,7 @@ private: ListFormatter &list; ChannelInfo *ci; bool show_all; - unsigned& foreign; + unsigned &foreign; public: AccessListCallback(ListFormatter &_list, ChannelInfo *_ci, const Anope::string &numlist, bool _show_all, unsigned &_foreign) diff --git a/modules/database/db_atheme.cpp b/modules/database/db_atheme.cpp index 5175f2576..04e7b3ced 100644 --- a/modules/database/db_atheme.cpp +++ b/modules/database/db_atheme.cpp @@ -253,7 +253,7 @@ private: } } - void ApplyFlags(Extensible *ext, Anope::string &flags, char flag, const char* extname, bool extend = true) + void ApplyFlags(Extensible *ext, Anope::string &flags, char flag, const char *extname, bool extend = true) { auto pos = flags.find(flag); auto has_flag = (pos != Anope::string::npos); diff --git a/modules/nickserv/ns_set_timezone.cpp b/modules/nickserv/ns_set_timezone.cpp index 91724263b..e5ad1d9c2 100644 --- a/modules/nickserv/ns_set_timezone.cpp +++ b/modules/nickserv/ns_set_timezone.cpp @@ -230,7 +230,7 @@ public: throw ModuleException("A compiler with C++20 support is required by this module"); #else // Build the zone list. - const auto& tzdb = std::chrono::get_tzdb(); + const auto &tzdb = std::chrono::get_tzdb(); for (const auto &tz : tzdb.zones) timezones.emplace_back(tz.name()); for (const auto &tz : tzdb.links) diff --git a/modules/operserv/os_stats.cpp b/modules/operserv/os_stats.cpp index 9f0a170c6..ceed98104 100644 --- a/modules/operserv/os_stats.cpp +++ b/modules/operserv/os_stats.cpp @@ -57,7 +57,7 @@ class CommandOSStats final private: ServiceReference akills, snlines, sqlines; - static void ReportXLineStats(CommandSource& source, XLineManager* xlm, const char* type, const char* config) + static void ReportXLineStats(CommandSource &source, XLineManager *xlm, const char *type, const char *config) { source.Reply(_("Current number of %ss: \002%zu\002"), type, xlm->GetCount()); diff --git a/modules/protocol/unrealircd.cpp b/modules/protocol/unrealircd.cpp index a11b0581e..8da16d8e8 100644 --- a/modules/protocol/unrealircd.cpp +++ b/modules/protocol/unrealircd.cpp @@ -496,7 +496,7 @@ namespace UnrealExtBan Anope::string xbname; public: - Base(const Anope::string &mname, const Anope::string& uname, char uchar) + Base(const Anope::string &mname, const Anope::string &uname, char uchar) : ChannelModeVirtual(mname, "BAN") , xbchar(uchar) , xbname(uname) diff --git a/src/command.cpp b/src/command.cpp index ebcaccb9a..51127c85e 100644 --- a/src/command.cpp +++ b/src/command.cpp @@ -232,7 +232,7 @@ void Command::OnSyntaxError(CommandSource &source, const Anope::string &subcomma namespace { - void HandleUnknownCommand(CommandSource& source, const Anope::string &message) + void HandleUnknownCommand(CommandSource &source, const Anope::string &message) { // Try to find a similar command. auto distance = Config->GetBlock("options").Get("didyoumeandifference", "4"); diff --git a/src/misc.cpp b/src/misc.cpp index 4c7c24c3a..80c09bdad 100644 --- a/src/misc.cpp +++ b/src/misc.cpp @@ -272,7 +272,7 @@ void InfoFormatter::SendTo(CommandSource &source) std::sort(this->options.begin(), this->options.end()); auto &optstr = (*this)[_("Options")]; - for (const auto& option : this->options) + for (const auto &option : this->options) { if (!optstr.empty()) optstr += ", "; @@ -436,7 +436,7 @@ bool LineWrapper::GetLine(Anope::string &out) auto toggle_formatting = [this, &uncertain_formatting](const Anope::string &fmt) { - auto it = std::find_if(formatting.begin(), formatting.end(), [&fmt](const auto& f) { + auto it = std::find_if(formatting.begin(), formatting.end(), [&fmt](const auto &f) { return f[0] == fmt[0]; }); if (it == formatting.end())