diff options
author | Sadie Powell <sadie@witchery.services> | 2024-02-26 15:27:01 +0000 |
---|---|---|
committer | Sadie Powell <sadie@witchery.services> | 2024-02-26 15:34:17 +0000 |
commit | c6cb4ba159a8916243d7ac5a5c4e8d13942baf99 (patch) | |
tree | 5183b6cb982dadb2b91987ff7b69486ea8d811df | |
parent | e341cac8d6565044f7390852afb40c5e388121df (diff) |
Fix some coding style issues.
78 files changed, 195 insertions, 195 deletions
diff --git a/include/access.h b/include/access.h index b1587f0c7..a2e65b153 100644 --- a/include/access.h +++ b/include/access.h @@ -98,7 +98,7 @@ public: NickCore *GetAccount() const; void Serialize(Serialize::Data &data) const override; - static Serializable* Unserialize(Serializable *obj, Serialize::Data &); + static Serializable *Unserialize(Serializable *obj, Serialize::Data &); static const unsigned int MAX_DEPTH = 4; @@ -107,7 +107,7 @@ public: * @param nc The account * @param next Next channel to check if any */ - virtual bool Matches(const User *u, const NickCore *nc, ChannelInfo* &next) const; + virtual bool Matches(const User *u, const NickCore *nc, ChannelInfo *&next) const; /** Check if this access entry has the given privilege. * @param name The privilege name diff --git a/include/account.h b/include/account.h index 3d6e0e846..ea65af9d4 100644 --- a/include/account.h +++ b/include/account.h @@ -56,7 +56,7 @@ public: ~NickAlias(); void Serialize(Serialize::Data &data) const override; - static Serializable* Unserialize(Serializable *obj, Serialize::Data &); + static Serializable *Unserialize(Serializable *obj, Serialize::Data &); /** Set a vhost for the user * @param ident The ident @@ -153,7 +153,7 @@ public: ~NickCore(); void Serialize(Serialize::Data &data) const override; - static Serializable* Unserialize(Serializable *obj, Serialize::Data &); + static Serializable *Unserialize(Serializable *obj, Serialize::Data &); /** Changes the display for this account * @param na The new display, must be grouped to this account. @@ -224,7 +224,7 @@ public: * @param nick The account name to find * @return The account, if it exists */ - static NickCore* Find(const Anope::string &nick); + static NickCore *Find(const Anope::string &nick); void AddChannelReference(ChannelInfo *ci); void RemoveChannelReference(ChannelInfo *ci); diff --git a/include/anope.h b/include/anope.h index 0f181c87f..b71f84f19 100644 --- a/include/anope.h +++ b/include/anope.h @@ -140,8 +140,8 @@ namespace Anope */ inline void push_back(char c) { return this->_string.push_back(c); } - inline string& append(const string &s) { this->_string.append(s.str()); return *this; } - inline string& append(const char *s, size_t n) { this->_string.append(s, n); return *this; } + inline string &append(const string &s) { this->_string.append(s.str()); return *this; } + inline string &append(const char *s, size_t n) { this->_string.append(s, n); return *this; } /** * Resizes the string content to n characters. @@ -159,21 +159,21 @@ namespace Anope * Trim leading and trailing white spaces from the string. */ - inline string& ltrim(const Anope::string &what = " \t\r\n") + inline string <rim(const Anope::string &what = " \t\r\n") { while (!this->_string.empty() && what.find(this->_string[0]) != Anope::string::npos) this->_string.erase(this->_string.begin()); return *this; } - inline string& rtrim(const Anope::string &what = " \t\r\n") + inline string &rtrim(const Anope::string &what = " \t\r\n") { while (!this->_string.empty() && what.find(this->_string[this->_string.length() - 1]) != Anope::string::npos) this->_string.erase(this->_string.length() - 1); return *this; } - inline string& trim(const Anope::string &what = " \t\r\n") + inline string &trim(const Anope::string &what = " \t\r\n") { this->ltrim(what); this->rtrim(what); @@ -210,9 +210,9 @@ namespace Anope inline size_type find_last_not_of(const string &_str, size_type pos = npos) const { return this->_string.find_last_not_of(_str._string, pos); } inline size_type find_last_not_of_ci(const string &_str, size_type pos = npos) const { return ci::string(this->_string.c_str()).find_last_not_of(ci::string(_str._string.c_str()), pos); } - inline int compare(size_t pos, size_t len, const string& str) const { return ci::string(this->_string.c_str()).compare(pos, len, ci::string(str.c_str())); } - inline int compare(size_t pos, size_t len, const string& str, size_t subpos, size_type sublen = npos) const { return ci::string(this->_string.c_str()).compare(pos, len, ci::string(str.c_str()), subpos, sublen); } - inline int compare(size_t pos, size_t len, const char* s, size_type n = npos) const { return ci::string(this->_string.c_str()).compare(pos, len, s, n); } + inline int compare(size_t pos, size_t len, const string &str) const { return ci::string(this->_string.c_str()).compare(pos, len, ci::string(str.c_str())); } + inline int compare(size_t pos, size_t len, const string &str, size_t subpos, size_type sublen = npos) const { return ci::string(this->_string.c_str()).compare(pos, len, ci::string(str.c_str()), subpos, sublen); } + inline int compare(size_t pos, size_t len, const char *s, size_type n = npos) const { return ci::string(this->_string.c_str()).compare(pos, len, s, n); } /** * Determine if string consists of only numbers. @@ -600,7 +600,7 @@ public: /** Gets every token from this stream * @param token Tokens are pushed back here */ - template<typename T> void GetTokens(T& token) + template<typename T> void GetTokens(T &token) { token.clear(); Anope::string t; diff --git a/include/base.h b/include/base.h index 07b3bdf89..f8d508b7e 100644 --- a/include/base.h +++ b/include/base.h @@ -103,14 +103,14 @@ public: return NULL; } - inline T* operator->() + inline T *operator->() { if (operator bool()) return this->ref; return NULL; } - inline T* operator*() + inline T *operator*() { if (operator bool()) return this->ref; diff --git a/include/bots.h b/include/bots.h index 8917621d6..711e306b5 100644 --- a/include/bots.h +++ b/include/bots.h @@ -56,7 +56,7 @@ public: virtual ~BotInfo(); void Serialize(Serialize::Data &data) const; - static Serializable* Unserialize(Serializable *obj, Serialize::Data &); + static Serializable *Unserialize(Serializable *obj, Serialize::Data &); void GenerateUID(); @@ -118,7 +118,7 @@ public: * @param permission Permission required to execute the command, if any * @return The commandinfo for the newly created command */ - CommandInfo& SetCommand(const Anope::string &cname, const Anope::string &sname, const Anope::string &permission = ""); + CommandInfo &SetCommand(const Anope::string &cname, const Anope::string &sname, const Anope::string &permission = ""); /** Get command info for a command * @param cname The command name @@ -131,5 +131,5 @@ public: * @param nick_only True to only look by nick, and not by UID * @return The bot, if it exists */ - static BotInfo* Find(const Anope::string &nick, bool nick_only = false); + static BotInfo *Find(const Anope::string &nick, bool nick_only = false); }; diff --git a/include/channels.h b/include/channels.h index d918f4a52..4fecd9fc8 100644 --- a/include/channels.h +++ b/include/channels.h @@ -110,7 +110,7 @@ public: * @param status The status to give the user, if any * @return The UserContainer for the user */ - ChanUserContainer* JoinUser(User *u, const ChannelStatus *status); + ChanUserContainer *JoinUser(User *u, const ChannelStatus *status); /** Remove a user internally from the channel * @param u The user @@ -302,7 +302,7 @@ public: * @param name The channel to find * @return The channel, if found */ - static Channel* Find(const Anope::string &name); + static Channel *Find(const Anope::string &name); /** Finds or creates a channel * @param name The channel name diff --git a/include/commands.h b/include/commands.h index ed318e60a..583f02da1 100644 --- a/include/commands.h +++ b/include/commands.h @@ -44,7 +44,7 @@ struct CoreExport CommandReply { virtual ~CommandReply() = default; virtual void SendMessage(BotInfo *source, const Anope::string &msg) = 0; - virtual void SendMessage(CommandSource& source, const Anope::string &msg); + virtual void SendMessage(CommandSource &source, const Anope::string &msg); }; /* The source for a command */ @@ -182,5 +182,5 @@ public: * @param name If found, is set to the command name, eg REGISTER * @return true if the given command service exists */ - static bool FindCommandFromService(const Anope::string &command_service, BotInfo* &bi, Anope::string &name); + static bool FindCommandFromService(const Anope::string &command_service, BotInfo *&bi, Anope::string &name); }; diff --git a/include/config.h b/include/config.h index c71625ac9..f787f60b0 100644 --- a/include/config.h +++ b/include/config.h @@ -42,8 +42,8 @@ namespace Configuration Block(const Anope::string &); const Anope::string &GetName() const; int CountBlock(const Anope::string &name) const; - const Block* GetBlock(const Anope::string &name, int num = 0) const; - Block* GetMutableBlock(const Anope::string &name, int num = 0); + const Block *GetBlock(const Anope::string &name, int num = 0) const; + Block *GetMutableBlock(const Anope::string &name, int num = 0); template<typename T> T Get(const Anope::string &tag, const Anope::string &def = "") const { @@ -61,7 +61,7 @@ namespace Configuration const item_map &GetItems() const; }; - template<> CoreExport const Anope::string Block::Get(const Anope::string &tag, const Anope::string& def) const; + template<> CoreExport const Anope::string Block::Get(const Anope::string &tag, const Anope::string &def) const; template<> CoreExport time_t Block::Get(const Anope::string &tag, const Anope::string &def) const; template<> CoreExport bool Block::Get(const Anope::string &tag, const Anope::string &def) const; } // namespace Internal diff --git a/include/extensible.h b/include/extensible.h index df76be036..0444e8226 100644 --- a/include/extensible.h +++ b/include/extensible.h @@ -41,12 +41,12 @@ public: void UnsetExtensibles(); - template<typename T> T* GetExt(const Anope::string &name) const; + template<typename T> T *GetExt(const Anope::string &name) const; bool HasExt(const Anope::string &name) const; - template<typename T> T* Extend(const Anope::string &name, const T &what); - template<typename T> T* Extend(const Anope::string &name); - template<typename T> T* Require(const Anope::string &name); + template<typename T> T *Extend(const Anope::string &name, const T &what); + template<typename T> T *Extend(const Anope::string &name); + template<typename T> T *Require(const Anope::string &name); template<typename T> void Shrink(const Anope::string &name); static void ExtensibleSerialize(const Extensible *, const Serializable *, Serialize::Data &data); @@ -77,17 +77,17 @@ public: } } - T* Set(Extensible *obj, const T &value) + T *Set(Extensible *obj, const T &value) { - T* t = Set(obj); + T *t = Set(obj); if (t) *t = value; return t; } - T* Set(Extensible *obj) + T *Set(Extensible *obj) { - T* t = Create(obj); + T *t = Create(obj); Unset(obj); items[obj] = t; obj->extension_items.insert(this); @@ -102,7 +102,7 @@ public: delete value; } - T* Get(const Extensible *obj) const + T *Get(const Extensible *obj) const { std::map<Extensible *, void *>::const_iterator it = items.find(const_cast<Extensible *>(obj)); if (it != items.end()) @@ -115,9 +115,9 @@ public: return items.find(const_cast<Extensible *>(obj)) != items.end(); } - T* Require(Extensible *obj) + T *Require(Extensible *obj) { - T* t = Get(obj); + T *t = Get(obj); if (t) return t; @@ -130,7 +130,7 @@ class ExtensibleItem : public BaseExtensibleItem<T> { protected: - T* Create(Extensible *obj) override + T *Create(Extensible *obj) override { return new T(obj); } @@ -143,7 +143,7 @@ class PrimitiveExtensibleItem : public BaseExtensibleItem<T> { protected: - T* Create(Extensible *obj) override + T *Create(Extensible *obj) override { return new T(); } @@ -155,7 +155,7 @@ template<> class PrimitiveExtensibleItem<bool> : public BaseExtensibleItem<bool> { protected: - bool* Create(Extensible *) override + bool *Create(Extensible *) override { return NULL; } @@ -172,7 +172,7 @@ public: void ExtensibleSerialize(const Extensible *e, const Serializable *s, Serialize::Data &data) const override { - T* t = this->Get(e); + T *t = this->Get(e); data[this->name] << *t; } @@ -216,7 +216,7 @@ struct ExtensibleRef final }; template<typename T> -T* Extensible::GetExt(const Anope::string &name) const +T *Extensible::GetExt(const Anope::string &name) const { ExtensibleRef<T> ref(name); if (ref) @@ -227,16 +227,16 @@ T* Extensible::GetExt(const Anope::string &name) const } template<typename T> -T* Extensible::Extend(const Anope::string &name, const T &what) +T *Extensible::Extend(const Anope::string &name, const T &what) { - T* t = Extend<T>(name); + T *t = Extend<T>(name); if (t) *t = what; return t; } template<typename T> -T* Extensible::Extend(const Anope::string &name) +T *Extensible::Extend(const Anope::string &name) { ExtensibleRef<T> ref(name); if (ref) @@ -247,7 +247,7 @@ T* Extensible::Extend(const Anope::string &name) } template<typename T> -T* Extensible::Require(const Anope::string &name) +T *Extensible::Require(const Anope::string &name) { if (HasExt(name)) return GetExt<T>(name); diff --git a/include/memo.h b/include/memo.h index 70d8d63b7..233c1c065 100644 --- a/include/memo.h +++ b/include/memo.h @@ -25,7 +25,7 @@ public: ~Memo(); void Serialize(Serialize::Data &data) const override; - static Serializable* Unserialize(Serializable *obj, Serialize::Data &); + static Serializable *Unserialize(Serializable *obj, Serialize::Data &); Anope::string owner; /* When it was sent */ diff --git a/include/modules/bs_badwords.h b/include/modules/bs_badwords.h index c20b4e87a..e4866d250 100644 --- a/include/modules/bs_badwords.h +++ b/include/modules/bs_badwords.h @@ -46,13 +46,13 @@ struct BadWords * @param type The type (SINGLE START END) * @return The badword */ - virtual BadWord* AddBadWord(const Anope::string &word, BadWordType type) = 0; + virtual BadWord *AddBadWord(const Anope::string &word, BadWordType type) = 0; /** Get a badword structure by index * @param index The index * @return The badword */ - virtual BadWord* GetBadWord(unsigned index) const = 0; + virtual BadWord *GetBadWord(unsigned index) const = 0; /** Get how many badwords are on this channel * @return The number of badwords in the vector diff --git a/include/modules/cs_entrymsg.h b/include/modules/cs_entrymsg.h index 8259adf49..219c598a6 100644 --- a/include/modules/cs_entrymsg.h +++ b/include/modules/cs_entrymsg.h @@ -33,5 +33,5 @@ public: delete (*this)->at(i - 1); } - virtual EntryMsg* Create() = 0; + virtual EntryMsg *Create() = 0; }; diff --git a/include/modules/httpd.h b/include/modules/httpd.h index b08ca8bf4..d78de4a02 100644 --- a/include/modules/httpd.h +++ b/include/modules/httpd.h @@ -27,9 +27,9 @@ struct HTTPReply final std::vector<cookie> cookies; HTTPReply() = default; - HTTPReply& operator=(const HTTPReply &) = default; + HTTPReply &operator=(const HTTPReply &) = default; - HTTPReply(const HTTPReply& other) : error(other.error), length(other.length) + HTTPReply(const HTTPReply &other) : error(other.error), length(other.length) { content_type = other.content_type; headers = other.headers; @@ -169,7 +169,7 @@ public: virtual bool RegisterPage(HTTPPage *page) = 0; virtual void UnregisterPage(HTTPPage *page) = 0; - virtual HTTPPage* FindPage(const Anope::string &name) = 0; + virtual HTTPPage *FindPage(const Anope::string &name) = 0; }; namespace HTTPUtils @@ -180,7 +180,7 @@ namespace HTTPUtils for (unsigned i = 0; i < url.length(); ++i) { - const char& c = url[i]; + const char &c = url[i]; if (c == '%' && i + 2 < url.length()) { diff --git a/include/modules/ns_cert.h b/include/modules/ns_cert.h index 804643e77..8ecf610bb 100644 --- a/include/modules/ns_cert.h +++ b/include/modules/ns_cert.h @@ -78,5 +78,5 @@ class CertService public: CertService(Module *c) : Service(c, "CertService", "certs") { } - virtual NickCore* FindAccountFromCert(const Anope::string &cert) = 0; + virtual NickCore *FindAccountFromCert(const Anope::string &cert) = 0; }; diff --git a/include/modules/os_forbid.h b/include/modules/os_forbid.h index 19b34a1e6..3dd7e3959 100644 --- a/include/modules/os_forbid.h +++ b/include/modules/os_forbid.h @@ -41,7 +41,7 @@ public: virtual void RemoveForbid(ForbidData *d) = 0; - virtual ForbidData* CreateForbid() = 0; + virtual ForbidData *CreateForbid() = 0; virtual ForbidData *FindForbid(const Anope::string &mask, ForbidType type) = 0; diff --git a/include/modules/os_session.h b/include/modules/os_session.h index 7077b0985..4281ed086 100644 --- a/include/modules/os_session.h +++ b/include/modules/os_session.h @@ -29,7 +29,7 @@ struct Exception final Exception() : Serializable("Exception") { } void Serialize(Serialize::Data &data) const override; - static Serializable* Unserialize(Serializable *obj, Serialize::Data &data); + static Serializable *Unserialize(Serializable *obj, Serialize::Data &data); }; class SessionService @@ -70,7 +70,7 @@ void Exception::Serialize(Serialize::Data &data) const data["expires"] << this->expires; } -Serializable* Exception::Unserialize(Serializable *obj, Serialize::Data &data) +Serializable *Exception::Unserialize(Serializable *obj, Serialize::Data &data) { if (!session_service) return NULL; diff --git a/include/modules/sasl.h b/include/modules/sasl.h index 2e4d990c5..e4d683d3f 100644 --- a/include/modules/sasl.h +++ b/include/modules/sasl.h @@ -32,7 +32,7 @@ namespace SASL virtual Anope::string GetAgent() = 0; - virtual Session* GetSession(const Anope::string &uid) = 0; + virtual Session *GetSession(const Anope::string &uid) = 0; virtual void SendMessage(SASL::Session *session, const Anope::string &type, const Anope::string &data) = 0; @@ -67,7 +67,7 @@ namespace SASL public: Mechanism(Module *o, const Anope::string &sname) : Service(o, "SASL::Mechanism", sname) { } - virtual Session* CreateSession(const Anope::string &uid) { return new Session(this, uid); } + virtual Session *CreateSession(const Anope::string &uid) { return new Session(this, uid); } virtual void ProcessMessage(Session *session, const Message &) = 0; diff --git a/include/modules/sql.h b/include/modules/sql.h index 8355fe009..1fe87b5f1 100644 --- a/include/modules/sql.h +++ b/include/modules/sql.h @@ -24,7 +24,7 @@ namespace SQL Clear(); } - std::iostream& operator[](const Anope::string &key) override + std::iostream &operator[](const Anope::string &key) override { std::stringstream *&ss = data[key]; if (!ss) @@ -107,7 +107,7 @@ namespace SQL Query() { } Query(const Anope::string &q) : query(q) { } - Query& operator=(const Anope::string &q) + Query &operator=(const Anope::string &q) { this->query = q; this->parameters.clear(); @@ -124,7 +124,7 @@ namespace SQL return !(*this == other); } - template<typename T> void SetValue(const Anope::string &key, const T& value, bool escape = true) + template<typename T> void SetValue(const Anope::string &key, const T &value, bool escape = true) { try { diff --git a/include/modules/xmlrpc.h b/include/modules/xmlrpc.h index 698a8e6ce..115fe4ad4 100644 --- a/include/modules/xmlrpc.h +++ b/include/modules/xmlrpc.h @@ -18,7 +18,7 @@ public: Anope::string name; Anope::string id; std::deque<Anope::string> data; - HTTPReply& r; + HTTPReply &r; XMLRPCRequest(HTTPReply &_r) : r(_r) { } inline void reply(const Anope::string &dname, const Anope::string &ddata) { this->replies.emplace(dname, ddata); } diff --git a/include/regchannel.h b/include/regchannel.h index 9b6a64971..4276333d5 100644 --- a/include/regchannel.h +++ b/include/regchannel.h @@ -39,7 +39,7 @@ public: AutoKick(); ~AutoKick(); void Serialize(Serialize::Data &data) const override; - static Serializable* Unserialize(Serializable *obj, Serialize::Data &); + static Serializable *Unserialize(Serializable *obj, Serialize::Data &); }; /* It matters that Base is here before Extensible (it is inherited by Serializable) @@ -95,10 +95,10 @@ public: ChannelInfo(const ChannelInfo &ci); ~ChannelInfo(); - ChannelInfo& operator=(const ChannelInfo &) = default; + ChannelInfo &operator=(const ChannelInfo &) = default; void Serialize(Serialize::Data &data) const override; - static Serializable* Unserialize(Serializable *obj, Serialize::Data &); + static Serializable *Unserialize(Serializable *obj, Serialize::Data &); /** Change the founder of the channel * @params nc The new founder @@ -169,7 +169,7 @@ public: * @param t The time the akick was added, defaults to now * @param lu The time the akick was last used, defaults to never */ - AutoKick* AddAkick(const Anope::string &user, NickCore *akicknc, const Anope::string &reason, time_t t = Anope::CurTime, time_t lu = 0); + AutoKick *AddAkick(const Anope::string &user, NickCore *akicknc, const Anope::string &reason, time_t t = Anope::CurTime, time_t lu = 0); /** Add an akick entry to the channel by reason * @param user The user who added the akick @@ -178,13 +178,13 @@ public: * @param t The time the akick was added, defaults to now * @param lu The time the akick was last used, defaults to never */ - AutoKick* AddAkick(const Anope::string &user, const Anope::string &mask, const Anope::string &reason, time_t t = Anope::CurTime, time_t lu = 0); + AutoKick *AddAkick(const Anope::string &user, const Anope::string &mask, const Anope::string &reason, time_t t = Anope::CurTime, time_t lu = 0); /** Get an entry from the channel akick list * @param index The index in the akick vector * @return The akick structure, or NULL if not found */ - AutoKick* GetAkick(unsigned index) const; + AutoKick *GetAkick(unsigned index) const; /** Get the size of the akick vector for this channel * @return The akick vector size @@ -238,7 +238,7 @@ public: * @param name channel name to lookup * @return the ChannelInfo associated with the channel */ - static ChannelInfo* Find(const Anope::string &name); + static ChannelInfo *Find(const Anope::string &name); void AddChannelReference(const Anope::string &what); void RemoveChannelReference(const Anope::string &what); diff --git a/include/serialize.h b/include/serialize.h index 91ced7370..02e58a21f 100644 --- a/include/serialize.h +++ b/include/serialize.h @@ -29,7 +29,7 @@ namespace Serialize virtual ~Data() = default; - virtual std::iostream& operator[](const Anope::string &key) = 0; + virtual std::iostream &operator[](const Anope::string &key) = 0; virtual std::set<Anope::string> KeySet() const { throw CoreException("Not supported"); } virtual size_t Hash() const { throw CoreException("Not supported"); } @@ -97,7 +97,7 @@ public: /** Get the type of serializable object this is * @return The serializable object type */ - Serialize::Type* GetSerializableType() const { return this->s_type; } + Serialize::Type *GetSerializableType() const { return this->s_type; } virtual void Serialize(Serialize::Data &data) const = 0; @@ -111,7 +111,7 @@ public: class CoreExport Serialize::Type final : public Base { - typedef Serializable* (*unserialize_func)(Serializable *obj, Serialize::Data &); + typedef Serializable *(*unserialize_func)(Serializable *obj, Serialize::Data &); static std::vector<Anope::string> TypeOrder; static std::map<Anope::string, Serialize::Type *> Types; @@ -168,7 +168,7 @@ public: */ void UpdateTimestamp(); - Module* GetOwner() const { return this->owner; } + Module *GetOwner() const { return this->owner; } static Serialize::Type *Find(const Anope::string &name); @@ -201,23 +201,23 @@ class Serialize::Checker public: Checker(const Anope::string &n) : name(n) { } - inline const T* operator->() const + inline const T *operator->() const { this->Check(); return &this->obj; } - inline T* operator->() + inline T *operator->() { this->Check(); return &this->obj; } - inline const T& operator*() const + inline const T &operator*() const { this->Check(); return this->obj; } - inline T& operator*() + inline T &operator*() { this->Check(); return this->obj; @@ -305,7 +305,7 @@ public: return NULL; } - inline T* operator*() const + inline T *operator*() const { if (!this->invalid) { @@ -318,7 +318,7 @@ public: return NULL; } - inline T* operator->() const + inline T *operator->() const { if (!this->invalid) { diff --git a/include/servers.h b/include/servers.h index 8f491fe01..cfdc9c4de 100644 --- a/include/servers.h +++ b/include/servers.h @@ -25,7 +25,7 @@ namespace Servers * the only server whose uplink *is* Me that is not a juped server. * @return Our uplink, or NULL if not uplinked to anything */ - extern CoreExport Server* GetUplink(); + extern CoreExport Server *GetUplink(); /* Server maps by name and id */ extern CoreExport Anope::map<Server *> ByName; diff --git a/include/users.h b/include/users.h index d8860e6f2..2cd71c240 100644 --- a/include/users.h +++ b/include/users.h @@ -116,7 +116,7 @@ protected: virtual ~User(); public: - static User* OnIntroduce(const Anope::string &snick, const Anope::string &sident, const Anope::string &shost, const Anope::string &svhost, const Anope::string &sip, Server *sserver, const Anope::string &srealname, time_t ts, const Anope::string &smodes, const Anope::string &suid, NickCore *nc); + static User *OnIntroduce(const Anope::string &snick, const Anope::string &sident, const Anope::string &shost, const Anope::string &svhost, const Anope::string &sip, Server *sserver, const Anope::string &srealname, time_t ts, const Anope::string &smodes, const Anope::string &suid, NickCore *nc); /** Update the nickname of a user record accordingly, should be * called from ircd protocol. @@ -193,7 +193,7 @@ public: */ void SendMessage(BotInfo *source, const char *fmt, ...) ATTR_FORMAT(3, 4); void SendMessage(BotInfo *source, const Anope::string &msg) override; - void SendMessage(CommandSource& source, const Anope::string &msg) override; + void SendMessage(CommandSource &source, const Anope::string &msg) override; /** Identify the user to a nick. * updates last_seen, logs the user in, @@ -377,7 +377,7 @@ public: * @param nick_only set to true to only look up by nick, not UID * @return the user, if they exist */ - static User* Find(const Anope::string &name, bool nick_only = false); + static User *Find(const Anope::string &name, bool nick_only = false); /** Quits all users who are pending to be quit */ diff --git a/include/xline.h b/include/xline.h index 1c269e7ac..7ba9e1a9a 100644 --- a/include/xline.h +++ b/include/xline.h @@ -45,7 +45,7 @@ public: bool IsRegex() const; void Serialize(Serialize::Data &data) const override; - static Serializable* Unserialize(Serializable *obj, Serialize::Data &data); + static Serializable *Unserialize(Serializable *obj, Serialize::Data &data); }; /* Managers XLines. There is one XLineManager per type of XLine. */ @@ -125,7 +125,7 @@ public: * @param index The index * @return The XLine, or NULL if the index is out of bounds */ - XLine* GetEntry(unsigned index); + XLine *GetEntry(unsigned index); /** Clear the XLine vector * Note: This does not remove the XLines from the IRCd @@ -145,7 +145,7 @@ public: * @param mask The mask * @return The XLine the user matches, or NULL */ - XLine* HasEntry(const Anope::string &mask); + XLine *HasEntry(const Anope::string &mask); /** Check a user against all of the xlines in this XLineManager * @param u The user diff --git a/modules/botserv/bs_badwords.cpp b/modules/botserv/bs_badwords.cpp index e513170e7..5dee8ed2c 100644 --- a/modules/botserv/bs_badwords.cpp +++ b/modules/botserv/bs_badwords.cpp @@ -26,7 +26,7 @@ struct BadWordImpl final data.SetType("type", Serialize::Data::DT_INT); data["type"] << this->type; } - static Serializable* Unserialize(Serializable *obj, Serialize::Data &); + static Serializable *Unserialize(Serializable *obj, Serialize::Data &); }; struct BadWordsImpl final @@ -40,7 +40,7 @@ struct BadWordsImpl final ~BadWordsImpl() override; - BadWord* AddBadWord(const Anope::string &word, BadWordType type) override + BadWord *AddBadWord(const Anope::string &word, BadWordType type) override { auto *bw = new BadWordImpl(); bw->chan = ci->name; @@ -54,7 +54,7 @@ struct BadWordsImpl final return bw; } - BadWord* GetBadWord(unsigned index) const override + BadWord *GetBadWord(unsigned index) const override { if (this->badwords->empty() || index >= this->badwords->size()) return NULL; @@ -117,7 +117,7 @@ BadWordImpl::~BadWordImpl() } } -Serializable* BadWordImpl::Unserialize(Serializable *obj, Serialize::Data &data) +Serializable *BadWordImpl::Unserialize(Serializable *obj, Serialize::Data &data) { Anope::string sci, sword; diff --git a/modules/botserv/bs_kick.cpp b/modules/botserv/bs_kick.cpp index fc8696410..a3e76fdab 100644 --- a/modules/botserv/bs_kick.cpp +++ b/modules/botserv/bs_kick.cpp @@ -175,7 +175,7 @@ public: bool OnHelp(CommandSource &source, const Anope::string &subcommand) override = 0; protected: - bool CheckArguments(CommandSource &source, const std::vector<Anope::string> ¶ms, ChannelInfo* &ci) + bool CheckArguments(CommandSource &source, const std::vector<Anope::string> ¶ms, ChannelInfo *&ci) { const Anope::string &chan = params[0]; const Anope::string &option = params[1]; diff --git a/modules/chanserv/cs_access.cpp b/modules/chanserv/cs_access.cpp index 7625f05aa..047ff4ec1 100644 --- a/modules/chanserv/cs_access.cpp +++ b/modules/chanserv/cs_access.cpp @@ -84,7 +84,7 @@ public: return new AccessChanAccess(this); } }; -AccessAccessProvider* AccessAccessProvider::me; +AccessAccessProvider *AccessAccessProvider::me; class CommandCSAccess final : public Command diff --git a/modules/chanserv/cs_entrymsg.cpp b/modules/chanserv/cs_entrymsg.cpp index c28c58bc9..df1f04581 100644 --- a/modules/chanserv/cs_entrymsg.cpp +++ b/modules/chanserv/cs_entrymsg.cpp @@ -38,7 +38,7 @@ struct EntryMsgImpl final data.SetType("when", Serialize::Data::DT_INT); data["when"] << this->when; } - static Serializable* Unserialize(Serializable *obj, Serialize::Data &data); + static Serializable *Unserialize(Serializable *obj, Serialize::Data &data); }; struct EntryMessageListImpl final @@ -46,7 +46,7 @@ struct EntryMessageListImpl final { EntryMessageListImpl(Extensible *) { } - EntryMsg* Create() override + EntryMsg *Create() override { return new EntryMsgImpl(); } @@ -68,7 +68,7 @@ EntryMsgImpl::~EntryMsgImpl() } -Serializable* EntryMsgImpl::Unserialize(Serializable *obj, Serialize::Data &data) +Serializable *EntryMsgImpl::Unserialize(Serializable *obj, Serialize::Data &data) { Anope::string sci, screator, smessage; time_t swhen; diff --git a/modules/chanserv/cs_flags.cpp b/modules/chanserv/cs_flags.cpp index 5c0027677..38de5c49f 100644 --- a/modules/chanserv/cs_flags.cpp +++ b/modules/chanserv/cs_flags.cpp @@ -76,7 +76,7 @@ public: return new FlagsChanAccess(this); } }; -FlagsAccessProvider* FlagsAccessProvider::ap; +FlagsAccessProvider *FlagsAccessProvider::ap; class CommandCSFlags final : public Command diff --git a/modules/chanserv/cs_log.cpp b/modules/chanserv/cs_log.cpp index 847316db6..213940a5c 100644 --- a/modules/chanserv/cs_log.cpp +++ b/modules/chanserv/cs_log.cpp @@ -47,7 +47,7 @@ struct LogSettingImpl final data.SetType("created", Serialize::Data::DT_INT); data["created"] << created; } - static Serializable* Unserialize(Serializable *obj, Serialize::Data &data) + static Serializable *Unserialize(Serializable *obj, Serialize::Data &data) { Anope::string sci; data["ci"] >> sci; diff --git a/modules/chanserv/cs_mode.cpp b/modules/chanserv/cs_mode.cpp index 05fb43c33..3aa8e709d 100644 --- a/modules/chanserv/cs_mode.cpp +++ b/modules/chanserv/cs_mode.cpp @@ -32,7 +32,7 @@ struct ModeLockImpl final } void Serialize(Serialize::Data &data) const override; - static Serializable* Unserialize(Serializable *obj, Serialize::Data &data); + static Serializable *Unserialize(Serializable *obj, Serialize::Data &data); }; struct ModeLocksImpl final @@ -213,7 +213,7 @@ void ModeLockImpl::Serialize(Serialize::Data &data) const data.SetType("created", Serialize::Data::DT_INT); data["created"] << this->created; } -Serializable* ModeLockImpl::Unserialize(Serializable *obj, Serialize::Data &data) +Serializable *ModeLockImpl::Unserialize(Serializable *obj, Serialize::Data &data) { Anope::string sci; diff --git a/modules/chanserv/cs_seen.cpp b/modules/chanserv/cs_seen.cpp index 6f4119e2f..ff57949c4 100644 --- a/modules/chanserv/cs_seen.cpp +++ b/modules/chanserv/cs_seen.cpp @@ -55,7 +55,7 @@ struct SeenInfo final data.SetType("last", Serialize::Data::DT_INT); data["last"] << last; } - static Serializable* Unserialize(Serializable *obj, Serialize::Data &data) + static Serializable *Unserialize(Serializable *obj, Serialize::Data &data) { Anope::string snick; @@ -66,7 +66,7 @@ struct SeenInfo final s = anope_dynamic_static_cast<SeenInfo *>(obj); else { - SeenInfo* &info = database[snick]; + SeenInfo *&info = database[snick]; if (!info) info = new SeenInfo(); s = info; @@ -445,7 +445,7 @@ private: if (simple || !u->server->IsSynced()) return; - SeenInfo* &info = database[nick]; + SeenInfo *&info = database[nick]; if (!info) info = new SeenInfo(); info->nick = nick; diff --git a/modules/chanserv/cs_set_misc.cpp b/modules/chanserv/cs_set_misc.cpp index 9a2c8d70e..685ab8022 100644 --- a/modules/chanserv/cs_set_misc.cpp +++ b/modules/chanserv/cs_set_misc.cpp @@ -21,7 +21,7 @@ static Anope::map<ExtensibleItem<CSMiscData> *> items; static ExtensibleItem<CSMiscData> *GetItem(const Anope::string &name) { - ExtensibleItem<CSMiscData>* &it = items[name]; + ExtensibleItem<CSMiscData> *&it = items[name]; if (!it) try { @@ -51,7 +51,7 @@ struct CSMiscData final sdata["data"] << this->data; } - static Serializable* Unserialize(Serializable *obj, Serialize::Data &data) + static Serializable *Unserialize(Serializable *obj, Serialize::Data &data) { Anope::string sci, sname, sdata; diff --git a/modules/chanserv/cs_suspend.cpp b/modules/chanserv/cs_suspend.cpp index 28f0debf4..a30227d6a 100644 --- a/modules/chanserv/cs_suspend.cpp +++ b/modules/chanserv/cs_suspend.cpp @@ -27,7 +27,7 @@ struct CSSuspendInfo final data["expires"] << expires; } - static Serializable* Unserialize(Serializable *obj, Serialize::Data &data) + static Serializable *Unserialize(Serializable *obj, Serialize::Data &data) { Anope::string schan; data["chan"] >> schan; diff --git a/modules/database/db_flatfile.cpp b/modules/database/db_flatfile.cpp index 4137ab981..d2225ce88 100644 --- a/modules/database/db_flatfile.cpp +++ b/modules/database/db_flatfile.cpp @@ -22,7 +22,7 @@ public: Anope::string last; std::fstream *fs = nullptr; - std::iostream& operator[](const Anope::string &key) override + std::iostream &operator[](const Anope::string &key) override { if (key != last) { @@ -44,7 +44,7 @@ public: std::stringstream ss; bool read = false; - std::iostream& operator[](const Anope::string &key) override + std::iostream &operator[](const Anope::string &key) override { if (!read) { diff --git a/modules/database/db_redis.cpp b/modules/database/db_redis.cpp index c7e2bc9e7..b4abcab7f 100644 --- a/modules/database/db_redis.cpp +++ b/modules/database/db_redis.cpp @@ -26,9 +26,9 @@ public: delete stream; } - std::iostream& operator[](const Anope::string &key) override + std::iostream &operator[](const Anope::string &key) override { - std::stringstream* &stream = data[key]; + std::stringstream *&stream = data[key]; if (!stream) stream = new std::stringstream(); return *stream; @@ -318,7 +318,7 @@ void ObjectLoader::OnResult(const Reply &r) data[key->bulk] << value->bulk; } - Serializable* &obj = st->objects[this->id]; + Serializable *&obj = st->objects[this->id]; obj = st->Unserialize(obj, data); if (obj) { @@ -337,7 +337,7 @@ void IDInterface::OnResult(const Reply &r) return; } - Serializable* &obj = o->GetSerializableType()->objects[r.i]; + Serializable *&obj = o->GetSerializableType()->objects[r.i]; if (obj) /* This shouldn't be possible */ obj->id = 0; @@ -537,7 +537,7 @@ void SubscriptionListener::OnResult(const Reply &r) } else if (op == "del") { - Serializable* &s = s_type->objects[obj_id]; + Serializable *&s = s_type->objects[obj_id]; if (s == NULL) return; @@ -587,7 +587,7 @@ void ModifiedObject::OnResult(const Reply &r) return; } - Serializable* &obj = st->objects[this->id]; + Serializable *&obj = st->objects[this->id]; /* Transaction start */ me->redis->StartTransaction(); diff --git a/modules/encryption/enc_bcrypt.cpp b/modules/encryption/enc_bcrypt.cpp index e7c19a2ae..3dea3f2c6 100644 --- a/modules/encryption/enc_bcrypt.cpp +++ b/modules/encryption/enc_bcrypt.cpp @@ -30,14 +30,14 @@ class EBCRYPT final return salt; } - Anope::string Generate(const Anope::string& data, const Anope::string& salt) + Anope::string Generate(const Anope::string &data, const Anope::string &salt) { char hash[64]; _crypt_blowfish_rn(data.c_str(), salt.c_str(), hash, sizeof(hash)); return hash; } - bool Compare(const Anope::string& string, const Anope::string& hash) + bool Compare(const Anope::string &string, const Anope::string &hash) { Anope::string ret = Generate(string, hash); if (ret.empty()) diff --git a/modules/extra/ldap.cpp b/modules/extra/ldap.cpp index 58ecefd6d..bcd4b8406 100644 --- a/modules/extra/ldap.cpp +++ b/modules/extra/ldap.cpp @@ -220,7 +220,7 @@ public: private: #ifdef _WIN32 // Windows LDAP does not implement this so we need to do it. - int ldap_initialize(LDAP** ldap, const char* url) + int ldap_initialize(LDAP **ldap, const char *url) { URL_COMPONENTS urlComponents; memset(&urlComponents, 0, sizeof(urlComponents)); @@ -508,7 +508,7 @@ public: } } - LDAP* GetConnection() + LDAP *GetConnection() { return con; } diff --git a/modules/extra/ssl_gnutls.cpp b/modules/extra/ssl_gnutls.cpp index fdf5b1bff..520f877c0 100644 --- a/modules/extra/ssl_gnutls.cpp +++ b/modules/extra/ssl_gnutls.cpp @@ -39,7 +39,7 @@ class SSLSocketIO final { public: gnutls_session_t sess = nullptr; - GnuTLS::X509CertCredentials* mycreds; + GnuTLS::X509CertCredentials *mycreds; /** Constructor */ @@ -181,7 +181,7 @@ namespace GnuTLS throw ConfigException("Error loading private key: " + Anope::string(gnutls_strerror(ret))); } - gnutls_x509_privkey_t& get() { return key.key; } + gnutls_x509_privkey_t &get() { return key.key; } }; class X509CertList final @@ -219,7 +219,7 @@ namespace GnuTLS gnutls_x509_crt_deinit(*i); } - gnutls_x509_crt_t* raw() { return &certs[0]; } + gnutls_x509_crt_t *raw() { return &certs[0]; } unsigned int size() const { return certs.size(); } }; @@ -236,7 +236,7 @@ namespace GnuTLS return ret; } - static int cert_callback(gnutls_session_t sess, const gnutls_datum_t* req_ca_rdn, int nreqs, const gnutls_pk_algorithm_t* sign_algos, int sign_algos_length, gnutls_retr2_st* st); + static int cert_callback(gnutls_session_t sess, const gnutls_datum_t *req_ca_rdn, int nreqs, const gnutls_pk_algorithm_t *sign_algos, int sign_algos_length, gnutls_retr2_st *st); public: X509CertList certs; @@ -628,7 +628,7 @@ SSLSocketIO::SSLSocketIO() : mycreds(me->cred) mycreds->incrref(); } -int GnuTLS::X509CertCredentials::cert_callback(gnutls_session_t sess, const gnutls_datum_t* req_ca_rdn, int nreqs, const gnutls_pk_algorithm_t* sign_algos, int sign_algos_length, gnutls_retr2_st* st) +int GnuTLS::X509CertCredentials::cert_callback(gnutls_session_t sess, const gnutls_datum_t *req_ca_rdn, int nreqs, const gnutls_pk_algorithm_t *sign_algos, int sign_algos_length, gnutls_retr2_st *st) { st->cert_type = GNUTLS_CRT_X509; st->key_type = GNUTLS_PRIVKEY_X509; diff --git a/modules/hostserv/hs_request.cpp b/modules/hostserv/hs_request.cpp index 44612ada0..1156d0538 100644 --- a/modules/hostserv/hs_request.cpp +++ b/modules/hostserv/hs_request.cpp @@ -38,7 +38,7 @@ struct HostRequest final data.SetType("time", Serialize::Data::DT_INT); data["time"] << this->time; } - static Serializable* Unserialize(Serializable *obj, Serialize::Data &data) + static Serializable *Unserialize(Serializable *obj, Serialize::Data &data) { Anope::string snick; data["nick"] >> snick; diff --git a/modules/httpd.cpp b/modules/httpd.cpp index 5c7a74ff5..b2eed517d 100644 --- a/modules/httpd.cpp +++ b/modules/httpd.cpp @@ -313,7 +313,7 @@ public: } } - ClientSocket* OnAccept(int fd, const sockaddrs &addr) override + ClientSocket *OnAccept(int fd, const sockaddrs &addr) override { auto *c = new MyHTTPClient(this, fd, addr); this->clients.emplace_back(c); @@ -330,7 +330,7 @@ public: this->pages.erase(page->GetURL()); } - HTTPPage* FindPage(const Anope::string &pname) override + HTTPPage *FindPage(const Anope::string &pname) override { if (this->pages.count(pname) == 0) return NULL; diff --git a/modules/nickserv/ns_ajoin.cpp b/modules/nickserv/ns_ajoin.cpp index 8f4b14112..19355f861 100644 --- a/modules/nickserv/ns_ajoin.cpp +++ b/modules/nickserv/ns_ajoin.cpp @@ -50,7 +50,7 @@ struct AJoinEntry final sd["key"] << this->key; } - static Serializable* Unserialize(Serializable *obj, Serialize::Data &sd) + static Serializable *Unserialize(Serializable *obj, Serialize::Data &sd) { Anope::string sowner; diff --git a/modules/nickserv/ns_cert.cpp b/modules/nickserv/ns_cert.cpp index 17cf1fb96..4f1b4ba57 100644 --- a/modules/nickserv/ns_cert.cpp +++ b/modules/nickserv/ns_cert.cpp @@ -19,7 +19,7 @@ struct CertServiceImpl final { CertServiceImpl(Module *o) : CertService(o) { } - NickCore* FindAccountFromCert(const Anope::string &cert) override + NickCore *FindAccountFromCert(const Anope::string &cert) override { Anope::hash_map<NickCore *>::iterator it = certmap.find(cert); if (it != certmap.end()) diff --git a/modules/nickserv/ns_group.cpp b/modules/nickserv/ns_group.cpp index 2dfaeb9fc..3afec1061 100644 --- a/modules/nickserv/ns_group.cpp +++ b/modules/nickserv/ns_group.cpp @@ -102,7 +102,7 @@ public: Anope::string nick; if (params.empty()) { - NickCore* core = source.GetAccount(); + NickCore *core = source.GetAccount(); if (core) nick = core->display; } diff --git a/modules/nickserv/ns_set_misc.cpp b/modules/nickserv/ns_set_misc.cpp index 4fcf10a1b..6f8ad0f4e 100644 --- a/modules/nickserv/ns_set_misc.cpp +++ b/modules/nickserv/ns_set_misc.cpp @@ -21,7 +21,7 @@ static Anope::map<ExtensibleItem<NSMiscData> *> items; static ExtensibleItem<NSMiscData> *GetItem(const Anope::string &name) { - ExtensibleItem<NSMiscData>* &it = items[name]; + ExtensibleItem<NSMiscData> *&it = items[name]; if (!it) try { @@ -51,7 +51,7 @@ struct NSMiscData final sdata["data"] << this->data; } - static Serializable* Unserialize(Serializable *obj, Serialize::Data &data) + static Serializable *Unserialize(Serializable *obj, Serialize::Data &data) { Anope::string snc, sname, sdata; diff --git a/modules/nickserv/ns_suspend.cpp b/modules/nickserv/ns_suspend.cpp index 97c69aae4..8ce2806ca 100644 --- a/modules/nickserv/ns_suspend.cpp +++ b/modules/nickserv/ns_suspend.cpp @@ -29,7 +29,7 @@ struct NSSuspendInfo final data["expires"] << expires; } - static Serializable* Unserialize(Serializable *obj, Serialize::Data &data) + static Serializable *Unserialize(Serializable *obj, Serialize::Data &data) { Anope::string snick; data["nick"] >> snick; diff --git a/modules/operserv/os_dns.cpp b/modules/operserv/os_dns.cpp index 79f4bf43e..b2fb17be2 100644 --- a/modules/operserv/os_dns.cpp +++ b/modules/operserv/os_dns.cpp @@ -45,7 +45,7 @@ struct DNSZone final data["server" + stringify(count++)] << server; } - static Serializable* Unserialize(Serializable *obj, Serialize::Data &data) + static Serializable *Unserialize(Serializable *obj, Serialize::Data &data) { DNSZone *zone; Anope::string zone_name; @@ -154,7 +154,7 @@ public: data["zone" + stringify(count++)] << zone; } - static Serializable* Unserialize(Serializable *obj, Serialize::Data &data) + static Serializable *Unserialize(Serializable *obj, Serialize::Data &data) { DNSServer *req; Anope::string server_name; @@ -856,7 +856,7 @@ public: if (req.questions.empty()) return; /* Currently we reply to any QR for A/AAAA */ - const DNS::Question& q = req.questions[0]; + const DNS::Question &q = req.questions[0]; if (q.type != DNS::QUERY_A && q.type != DNS::QUERY_AAAA && q.type != DNS::QUERY_AXFR && q.type != DNS::QUERY_ANY) return; diff --git a/modules/operserv/os_forbid.cpp b/modules/operserv/os_forbid.cpp index a06f51bb0..4b19fbc4d 100644 --- a/modules/operserv/os_forbid.cpp +++ b/modules/operserv/os_forbid.cpp @@ -20,7 +20,7 @@ struct ForbidDataImpl final { ForbidDataImpl() : Serializable("ForbidData") { } void Serialize(Serialize::Data &data) const override; - static Serializable* Unserialize(Serializable *obj, Serialize::Data &data); + static Serializable *Unserialize(Serializable *obj, Serialize::Data &data); }; void ForbidDataImpl::Serialize(Serialize::Data &data) const @@ -33,7 +33,7 @@ void ForbidDataImpl::Serialize(Serialize::Data &data) const data["type"] << this->type; } -Serializable* ForbidDataImpl::Unserialize(Serializable *obj, Serialize::Data &data) +Serializable *ForbidDataImpl::Unserialize(Serializable *obj, Serialize::Data &data) { if (!forbid_service) return NULL; diff --git a/modules/operserv/os_ignore.cpp b/modules/operserv/os_ignore.cpp index 94cb807a1..b777158e5 100644 --- a/modules/operserv/os_ignore.cpp +++ b/modules/operserv/os_ignore.cpp @@ -19,7 +19,7 @@ struct IgnoreDataImpl final IgnoreDataImpl() : Serializable("IgnoreData") { } ~IgnoreDataImpl() override; void Serialize(Serialize::Data &data) const override; - static Serializable* Unserialize(Serializable *obj, Serialize::Data &data); + static Serializable *Unserialize(Serializable *obj, Serialize::Data &data); }; IgnoreDataImpl::~IgnoreDataImpl() @@ -36,7 +36,7 @@ void IgnoreDataImpl::Serialize(Serialize::Data &data) const data["time"] << this->time; } -Serializable* IgnoreDataImpl::Unserialize(Serializable *obj, Serialize::Data &data) +Serializable *IgnoreDataImpl::Unserialize(Serializable *obj, Serialize::Data &data) { if (!ignore_service) return NULL; diff --git a/modules/operserv/os_news.cpp b/modules/operserv/os_news.cpp index 66f4a5026..067bfbc74 100644 --- a/modules/operserv/os_news.cpp +++ b/modules/operserv/os_news.cpp @@ -75,7 +75,7 @@ struct MyNewsItem final data["time"] << this->time; } - static Serializable* Unserialize(Serializable *obj, Serialize::Data &data) + static Serializable *Unserialize(Serializable *obj, Serialize::Data &data) { if (!news_service) return NULL; diff --git a/modules/operserv/os_oper.cpp b/modules/operserv/os_oper.cpp index 7f18da9ac..73cd793da 100644 --- a/modules/operserv/os_oper.cpp +++ b/modules/operserv/os_oper.cpp @@ -23,7 +23,7 @@ struct MyOper final data["type"] << this->ot->GetName(); } - static Serializable* Unserialize(Serializable *obj, Serialize::Data &data) + static Serializable *Unserialize(Serializable *obj, Serialize::Data &data) { Anope::string stype, sname; diff --git a/modules/operserv/os_session.cpp b/modules/operserv/os_session.cpp index 213721b1a..ffa2b3cc9 100644 --- a/modules/operserv/os_session.cpp +++ b/modules/operserv/os_session.cpp @@ -116,7 +116,7 @@ public: return this->Sessions.find(c); } - Session* &FindOrCreateSession(const cidr &ip) + Session *&FindOrCreateSession(const cidr &ip) { return this->Sessions[ip]; } @@ -632,7 +632,7 @@ public: if (!u_ip.valid()) return; - Session* &session = this->ss.FindOrCreateSession(u_ip); + Session *&session = this->ss.FindOrCreateSession(u_ip); if (session) { diff --git a/modules/operserv/os_stats.cpp b/modules/operserv/os_stats.cpp index 82c62ce6e..fe4cd6f80 100644 --- a/modules/operserv/os_stats.cpp +++ b/modules/operserv/os_stats.cpp @@ -28,7 +28,7 @@ struct Stats final data["maxusertime"] << MaxUserTime; } - static Serializable* Unserialize(Serializable *obj, Serialize::Data &data) + static Serializable *Unserialize(Serializable *obj, Serialize::Data &data) { data["maxusercnt"] >> MaxUserCount; data["maxusertime"] >> MaxUserTime; @@ -160,7 +160,7 @@ private: return; } - template<typename T> void GetHashStats(const T& map, size_t& entries, size_t& buckets, size_t& max_chain) + template<typename T> void GetHashStats(const T &map, size_t &entries, size_t &buckets, size_t &max_chain) { entries = map.size(), buckets = map.bucket_count(), max_chain = 0; for (size_t i = 0; i < buckets; ++i) diff --git a/modules/operserv/os_sxline.cpp b/modules/operserv/os_sxline.cpp index 3acaa5c35..769a25982 100644 --- a/modules/operserv/os_sxline.cpp +++ b/modules/operserv/os_sxline.cpp @@ -59,7 +59,7 @@ class CommandOSSXLineBase : public Command { private: - virtual XLineManager* xlm() = 0; + virtual XLineManager *xlm() = 0; virtual void OnAdd(CommandSource &source, const std::vector<Anope::string> ¶ms) = 0; diff --git a/modules/protocol/bahamut.cpp b/modules/protocol/bahamut.cpp index 642e6f193..e9a5ac163 100644 --- a/modules/protocol/bahamut.cpp +++ b/modules/protocol/bahamut.cpp @@ -59,7 +59,7 @@ public: IRCDProto::SendModeInternal(source, chan, modes, values); } - void SendModeInternal(const MessageSource &source, User* u, const Anope::string &modes, const std::vector<Anope::string> &values) override + void SendModeInternal(const MessageSource &source, User *u, const Anope::string &modes, const std::vector<Anope::string> &values) override { auto params = values; params.insert(params.begin(), { u->nick, stringify(u->timestamp), modes }); diff --git a/modules/protocol/hybrid.cpp b/modules/protocol/hybrid.cpp index 3e19daf1a..c859ae98f 100644 --- a/modules/protocol/hybrid.cpp +++ b/modules/protocol/hybrid.cpp @@ -200,7 +200,7 @@ public: Uplink::Send("EOB"); } - void SendModeInternal(const MessageSource &source, User* u, const Anope::string &modes, const std::vector<Anope::string> &values) override + void SendModeInternal(const MessageSource &source, User *u, const Anope::string &modes, const std::vector<Anope::string> &values) override { auto params = values; params.insert(params.begin(), { u->GetUID(), stringify(u->timestamp), modes }); diff --git a/modules/protocol/inspircd.cpp b/modules/protocol/inspircd.cpp index d1d5a03b9..7cb86598a 100644 --- a/modules/protocol/inspircd.cpp +++ b/modules/protocol/inspircd.cpp @@ -918,7 +918,7 @@ struct IRCDMessageCapab final Anope::string type; }; - static bool ParseMode(const Anope::string& token, ModeInfo& mode) + static bool ParseMode(const Anope::string &token, ModeInfo &mode) { // list:ban=b param-set:limit=l param:key=k prefix:30000:op=@o simple:noextmsg=n // A C A C A C A B C A C @@ -1549,7 +1549,7 @@ public: if (params[1].equals_cs("modules") && !params[2].empty()) { // only interested when it comes from our uplink - Server* server = source.GetServer(); + Server *server = source.GetServer(); if (!server || server->GetUplink() != Me) return; diff --git a/modules/protocol/plexus.cpp b/modules/protocol/plexus.cpp index c7f5e559a..fe0d37e22 100644 --- a/modules/protocol/plexus.cpp +++ b/modules/protocol/plexus.cpp @@ -141,7 +141,7 @@ public: Uplink::Send("UID", u->nick, 1, u->timestamp, "+" + u->GetModes(), u->GetIdent(), u->host, "255.255.255.255", u->GetUID(), 0, u->host, u->realname); } - void SendModeInternal(const MessageSource &source, User* u, const Anope::string &modes, const std::vector<Anope::string> &values) override + void SendModeInternal(const MessageSource &source, User *u, const Anope::string &modes, const std::vector<Anope::string> &values) override { auto params = values; params.insert(params.begin(), { "*", "SVSMODE", u->GetUID(), stringify(u->timestamp), modes }); diff --git a/modules/regex_stdlib.cpp b/modules/regex_stdlib.cpp index d759cc8fd..0ef7e3f81 100644 --- a/modules/regex_stdlib.cpp +++ b/modules/regex_stdlib.cpp @@ -24,7 +24,7 @@ public: { regex.assign(expr.str(), type | std::regex::optimize); } - catch (const std::regex_error& error) + catch (const std::regex_error &error) { throw RegexException("Error in regex " + expr + ": " + error.what()); } diff --git a/modules/sasl.cpp b/modules/sasl.cpp index 447662f34..815291166 100644 --- a/modules/sasl.cpp +++ b/modules/sasl.cpp @@ -93,7 +93,7 @@ public: throw ModuleException("No CertFP"); } - Session* CreateSession(const Anope::string &uid) override + Session *CreateSession(const Anope::string &uid) override { return new Session(this, uid); } @@ -206,7 +206,7 @@ public: } } - Session* session = GetSession(m.source); + Session *session = GetSession(m.source); if (m.type == "S") { @@ -267,7 +267,7 @@ public: return agent; } - Session* GetSession(const Anope::string &uid) override + Session *GetSession(const Anope::string &uid) override { std::map<Anope::string, Session *>::iterator it = sessions.find(uid); if (it != sessions.end()) diff --git a/modules/webcpanel/template_fileserver.h b/modules/webcpanel/template_fileserver.h index 4f3987f53..8466a1736 100644 --- a/modules/webcpanel/template_fileserver.h +++ b/modules/webcpanel/template_fileserver.h @@ -17,7 +17,7 @@ public: struct Replacements final : std::multimap<Anope::string, Anope::string> { - Anope::string& operator[](const Anope::string &key) + Anope::string &operator[](const Anope::string &key) { return emplace(key, "")->second; } diff --git a/modules/xmlrpc_main.cpp b/modules/xmlrpc_main.cpp index 9ac8ad8d1..cdf29d47f 100644 --- a/modules/xmlrpc_main.cpp +++ b/modules/xmlrpc_main.cpp @@ -21,7 +21,7 @@ class XMLRPCIdentifyRequest final Reference<XMLRPCServiceInterface> xinterface; public: - XMLRPCIdentifyRequest(Module *m, XMLRPCRequest& req, HTTPClient *c, XMLRPCServiceInterface* iface, const Anope::string &acc, const Anope::string &pass) : IdentifyRequest(m, acc, pass), request(req), repl(request.r), client(c), xinterface(iface) { } + XMLRPCIdentifyRequest(Module *m, XMLRPCRequest &req, HTTPClient *c, XMLRPCServiceInterface *iface, const Anope::string &acc, const Anope::string &pass) : IdentifyRequest(m, acc, pass), request(req), repl(request.r), client(c), xinterface(iface) { } void OnSuccess() override { diff --git a/src/access.cpp b/src/access.cpp index e430f7cb0..f5d4d784b 100644 --- a/src/access.cpp +++ b/src/access.cpp @@ -170,7 +170,7 @@ void ChanAccess::Serialize(Serialize::Data &data) const data["data"] << this->AccessSerialize(); } -Serializable* ChanAccess::Unserialize(Serializable *obj, Serialize::Data &data) +Serializable *ChanAccess::Unserialize(Serializable *obj, Serialize::Data &data) { Anope::string provider, chan; @@ -205,7 +205,7 @@ Serializable* ChanAccess::Unserialize(Serializable *obj, Serialize::Data &data) return access; } -bool ChanAccess::Matches(const User *u, const NickCore *acc, ChannelInfo* &next) const +bool ChanAccess::Matches(const User *u, const NickCore *acc, ChannelInfo *&next) const { next = NULL; diff --git a/src/bots.cpp b/src/bots.cpp index 7417db6e7..ecccafe16 100644 --- a/src/bots.cpp +++ b/src/bots.cpp @@ -85,7 +85,7 @@ void BotInfo::Serialize(Serialize::Data &data) const Extensible::ExtensibleSerialize(this, this, data); } -Serializable* BotInfo::Unserialize(Serializable *obj, Serialize::Data &data) +Serializable *BotInfo::Unserialize(Serializable *obj, Serialize::Data &data) { Anope::string nick, user, host, realname, flags; @@ -237,7 +237,7 @@ void BotInfo::OnMessage(User *u, const Anope::string &message, const Anope::map< Command::Run(source, message); } -CommandInfo& BotInfo::SetCommand(const Anope::string &cname, const Anope::string &sname, const Anope::string &permission) +CommandInfo &BotInfo::SetCommand(const Anope::string &cname, const Anope::string &sname, const Anope::string &permission) { CommandInfo ci; ci.name = sname; @@ -254,7 +254,7 @@ CommandInfo *BotInfo::GetCommand(const Anope::string &cname) return NULL; } -BotInfo* BotInfo::Find(const Anope::string &nick, bool nick_only) +BotInfo *BotInfo::Find(const Anope::string &nick, bool nick_only) { if (!nick_only && IRCD != NULL && IRCD->RequiresID) { diff --git a/src/channels.cpp b/src/channels.cpp index 4b33eba8f..8a3248183 100644 --- a/src/channels.cpp +++ b/src/channels.cpp @@ -137,7 +137,7 @@ bool Channel::CheckDelete() return MOD_RESULT != EVENT_STOP && this->users.empty(); } -ChanUserContainer* Channel::JoinUser(User *user, const ChannelStatus *status) +ChanUserContainer *Channel::JoinUser(User *user, const ChannelStatus *status) { if (user->server && user->server->IsSynced()) Log(user, this, "join"); @@ -934,7 +934,7 @@ bool Channel::CheckKick(User *user) return true; } -BotInfo* Channel::WhoSends() const +BotInfo *Channel::WhoSends() const { if (ci) return ci->WhoSends(); @@ -949,7 +949,7 @@ BotInfo* Channel::WhoSends() const return NULL; } -Channel* Channel::Find(const Anope::string &name) +Channel *Channel::Find(const Anope::string &name) { channel_map::const_iterator it = ChannelList.find(name); @@ -960,7 +960,7 @@ Channel* Channel::Find(const Anope::string &name) Channel *Channel::FindOrCreate(const Anope::string &name, bool &created, time_t ts) { - Channel* &chan = ChannelList[name]; + Channel *&chan = ChannelList[name]; created = chan == NULL; if (!chan) chan = new Channel(name, ts); diff --git a/src/command.cpp b/src/command.cpp index dc24dac0b..c9372c40f 100644 --- a/src/command.cpp +++ b/src/command.cpp @@ -17,7 +17,7 @@ #include "regchannel.h" #include "channels.h" -void CommandReply::SendMessage(CommandSource& source, const Anope::string &msg) +void CommandReply::SendMessage(CommandSource &source, const Anope::string &msg) { SendMessage(source.service, msg); } @@ -294,7 +294,7 @@ void Command::Run(CommandSource &source, const Anope::string &cmdname, const Com FOREACH_MOD(OnPostCommand, (source, this, params)); } -bool Command::FindCommandFromService(const Anope::string &command_service, BotInfo* &bot, Anope::string &name) +bool Command::FindCommandFromService(const Anope::string &command_service, BotInfo *&bot, Anope::string &name) { bot = NULL; diff --git a/src/config.cpp b/src/config.cpp index bcba9de38..99720ef2e 100644 --- a/src/config.cpp +++ b/src/config.cpp @@ -40,7 +40,7 @@ int Block::CountBlock(const Anope::string &bname) const return blocks.count(bname); } -const Block* Block::GetBlock(const Anope::string &bname, int num) const +const Block *Block::GetBlock(const Anope::string &bname, int num) const { std::pair<block_map::const_iterator, block_map::const_iterator> it = blocks.equal_range(bname); @@ -50,7 +50,7 @@ const Block* Block::GetBlock(const Anope::string &bname, int num) const return &EmptyBlock; } -Block* Block::GetMutableBlock(const Anope::string &bname, int num) +Block *Block::GetMutableBlock(const Anope::string &bname, int num) { std::pair<block_map::iterator, block_map::iterator> it = blocks.equal_range(bname); @@ -71,7 +71,7 @@ const Block::item_map &Block::GetItems() const return items; } -template<> const Anope::string Block::Get(const Anope::string &tag, const Anope::string& def) const +template<> const Anope::string Block::Get(const Anope::string &tag, const Anope::string &def) const { Anope::map<Anope::string>::const_iterator it = items.find(tag); if (it != items.end()) @@ -635,7 +635,7 @@ Block *Conf::GetModule(const Anope::string &mname) if (it != modules.end()) return it->second; - Block* &block = modules[mname]; + Block *&block = modules[mname]; /* Search for the block */ for (std::pair<block_map::iterator, block_map::iterator> iters = blocks.equal_range("module"); iters.first != iters.second; ++iters.first) diff --git a/src/extensible.cpp b/src/extensible.cpp index afcf61297..893781420 100644 --- a/src/extensible.cpp +++ b/src/extensible.cpp @@ -59,7 +59,7 @@ void Extensible::ExtensibleUnserialize(Extensible *e, Serializable *s, Serialize } template<> -bool* Extensible::Extend(const Anope::string &name, const bool &what) +bool *Extensible::Extend(const Anope::string &name, const bool &what) { ExtensibleRef<bool> ref(name); if (ref) diff --git a/src/memos.cpp b/src/memos.cpp index f46c3b060..2e9f10db1 100644 --- a/src/memos.cpp +++ b/src/memos.cpp @@ -44,7 +44,7 @@ void Memo::Serialize(Serialize::Data &data) const data["receipt"] << this->receipt; } -Serializable* Memo::Unserialize(Serializable *obj, Serialize::Data &data) +Serializable *Memo::Unserialize(Serializable *obj, Serialize::Data &data) { Anope::string owner; diff --git a/src/misc.cpp b/src/misc.cpp index 8ef034d6d..6d8c1ce9a 100644 --- a/src/misc.cpp +++ b/src/misc.cpp @@ -228,7 +228,7 @@ void InfoFormatter::Process(std::vector<Anope::string> &buffer) } } -Anope::string& InfoFormatter::operator[](const Anope::string &key) +Anope::string &InfoFormatter::operator[](const Anope::string &key) { Anope::string tkey = Language::Translate(this->nc, key.c_str()); if (tkey.length() > this->longest) diff --git a/src/nickalias.cpp b/src/nickalias.cpp index 8445b8a5e..0b60a13f4 100644 --- a/src/nickalias.cpp +++ b/src/nickalias.cpp @@ -20,7 +20,7 @@ Serialize::Checker<nickalias_map> NickAliasList("NickAlias"); -NickAlias::NickAlias(const Anope::string &nickname, NickCore* nickcore) : Serializable("NickAlias") +NickAlias::NickAlias(const Anope::string &nickname, NickCore *nickcore) : Serializable("NickAlias") { if (nickname.empty()) throw CoreException("Empty nick passed to NickAlias constructor"); @@ -153,7 +153,7 @@ void NickAlias::Serialize(Serialize::Data &data) const Extensible::ExtensibleSerialize(this, this, data); } -Serializable* NickAlias::Unserialize(Serializable *obj, Serialize::Data &data) +Serializable *NickAlias::Unserialize(Serializable *obj, Serialize::Data &data) { Anope::string snc, snick; diff --git a/src/nickcore.cpp b/src/nickcore.cpp index f67cda426..b39bba4db 100644 --- a/src/nickcore.cpp +++ b/src/nickcore.cpp @@ -86,7 +86,7 @@ void NickCore::Serialize(Serialize::Data &data) const Extensible::ExtensibleSerialize(this, this, data); } -Serializable* NickCore::Unserialize(Serializable *obj, Serialize::Data &data) +Serializable *NickCore::Unserialize(Serializable *obj, Serialize::Data &data) { NickCore *nc; @@ -257,7 +257,7 @@ void NickCore::AddChannelReference(ChannelInfo *ci) void NickCore::RemoveChannelReference(ChannelInfo *ci) { - int& i = (*this->chanaccess)[ci]; + int &i = (*this->chanaccess)[ci]; if (--i <= 0) this->chanaccess->erase(ci); } @@ -269,7 +269,7 @@ void NickCore::GetChannelReferences(std::deque<ChannelInfo *> &queue) queue.push_back(ci); } -NickCore* NickCore::Find(const Anope::string &nick) +NickCore *NickCore::Find(const Anope::string &nick) { nickcore_map::const_iterator it = NickCoreList->find(nick); if (it != NickCoreList->end()) diff --git a/src/regchannel.cpp b/src/regchannel.cpp index 912a3e5b2..a3e04d864 100644 --- a/src/regchannel.cpp +++ b/src/regchannel.cpp @@ -51,7 +51,7 @@ void AutoKick::Serialize(Serialize::Data &data) const data.SetType("last_used", Serialize::Data::DT_INT); data["last_used"] << this->last_used; } -Serializable* AutoKick::Unserialize(Serializable *obj, Serialize::Data &data) +Serializable *AutoKick::Unserialize(Serializable *obj, Serialize::Data &data) { Anope::string sci, snc; @@ -208,7 +208,7 @@ void ChannelInfo::Serialize(Serialize::Data &data) const Extensible::ExtensibleSerialize(this, this, data); } -Serializable* ChannelInfo::Unserialize(Serializable *obj, Serialize::Data &data) +Serializable *ChannelInfo::Unserialize(Serializable *obj, Serialize::Data &data) { Anope::string sname, sfounder, ssuccessor, slevels, sbi; @@ -644,7 +644,7 @@ Anope::string ChannelInfo::GetIdealBan(User *u) const } } -ChannelInfo* ChannelInfo::Find(const Anope::string &name) +ChannelInfo *ChannelInfo::Find(const Anope::string &name) { registered_channel_map::const_iterator it = RegisteredChannelList->find(name); if (it != RegisteredChannelList->end()) diff --git a/src/servers.cpp b/src/servers.cpp index ef9276fa9..1435ee743 100644 --- a/src/servers.cpp +++ b/src/servers.cpp @@ -346,7 +346,7 @@ Server *Server::Find(const Anope::string &name, bool name_only) return NULL; } -Server* Servers::GetUplink() +Server *Servers::GetUplink() { for (auto *link : Me->GetLinks()) { diff --git a/src/threadengine.cpp b/src/threadengine.cpp index a2af55e87..7e1e76693 100644 --- a/src/threadengine.cpp +++ b/src/threadengine.cpp @@ -46,7 +46,7 @@ void Thread::Start() if (!this->handle) this->handle = std::make_unique<std::thread>(entry_point, this); } - catch (const std::system_error& err) + catch (const std::system_error &err) { this->flags[SF_DEAD] = true; throw CoreException("Unable to create thread: " + std::string(err.what())); diff --git a/src/uplink.cpp b/src/uplink.cpp index a6343f7db..dece54ba8 100644 --- a/src/uplink.cpp +++ b/src/uplink.cpp @@ -105,7 +105,7 @@ UplinkSocket::~UplinkSocket() { /* Don't use quitmsg here, it may contain information you don't want people to see */ IRCD->SendQuit(u, "Shutting down"); - BotInfo* bi = BotInfo::Find(u->GetUID()); + BotInfo *bi = BotInfo::Find(u->GetUID()); if (bi != NULL) bi->introduced = false; } diff --git a/src/users.cpp b/src/users.cpp index efe71f2a9..f2bf55e88 100644 --- a/src/users.cpp +++ b/src/users.cpp @@ -111,7 +111,7 @@ static void Collide(User *u, const Anope::string &id, const Anope::string &type) CollideKill(u, type); } -User* User::OnIntroduce(const Anope::string &snick, const Anope::string &sident, const Anope::string &shost, const Anope::string &svhost, const Anope::string &sip, Server *sserver, const Anope::string &srealname, time_t ts, const Anope::string &smodes, const Anope::string &suid, NickCore *nc) +User *User::OnIntroduce(const Anope::string &snick, const Anope::string &sident, const Anope::string &shost, const Anope::string &svhost, const Anope::string &sip, Server *sserver, const Anope::string &srealname, time_t ts, const Anope::string &smodes, const Anope::string &suid, NickCore *nc) { // How IRCds handle collisions varies a lot, for safety well just always kill both sides // With properly set qlines, this can almost never happen anyway @@ -160,7 +160,7 @@ void User::ChangeNick(const Anope::string &newnick, time_t ts) this->nick = newnick; - User* &other = UserListByNick[this->nick]; + User *&other = UserListByNick[this->nick]; if (other) { CollideKill(this, "Nick collision"); @@ -334,7 +334,7 @@ void User::SendMessage(BotInfo *source, const char *fmt, ...) namespace { - void SendMessageInternal(BotInfo *source, User* target, const Anope::string &msg, const Anope::map<Anope::string> &tags) + void SendMessageInternal(BotInfo *source, User *target, const Anope::string &msg, const Anope::map<Anope::string> &tags) { const char *translated_message = Language::Translate(target, msg.c_str()); @@ -354,7 +354,7 @@ void User::SendMessage(BotInfo *source, const Anope::string &msg) SendMessageInternal(source, this, msg, {}); } -void User::SendMessage(CommandSource& source, const Anope::string &msg) +void User::SendMessage(CommandSource &source, const Anope::string &msg) { Anope::map<Anope::string> tags; if (!source.msgid.empty()) @@ -861,7 +861,7 @@ bool User::ShouldPrivmsg() const return Config->UsePrivmsg && ((!nc && Config->DefPrivmsg) || (nc && nc->HasExt("MSG"))); } -User* User::Find(const Anope::string &name, bool nick_only) +User *User::Find(const Anope::string &name, bool nick_only) { if (!nick_only && IRCD && IRCD->RequiresID) { diff --git a/src/xline.cpp b/src/xline.cpp index 828446ed7..cbc26a36c 100644 --- a/src/xline.cpp +++ b/src/xline.cpp @@ -163,7 +163,7 @@ void XLine::Serialize(Serialize::Data &data) const data["manager"] << this->manager->name; } -Serializable* XLine::Unserialize(Serializable *obj, Serialize::Data &data) +Serializable *XLine::Unserialize(Serializable *obj, Serialize::Data &data) { Anope::string smanager; @@ -344,7 +344,7 @@ bool XLineManager::DelXLine(XLine *x) return false; } -XLine* XLineManager::GetEntry(unsigned index) +XLine *XLineManager::GetEntry(unsigned index) { if (index >= this->xlines->size()) return NULL; @@ -414,7 +414,7 @@ bool XLineManager::CanAdd(CommandSource &source, const Anope::string &mask, time return true; } -XLine* XLineManager::HasEntry(const Anope::string &mask) +XLine *XLineManager::HasEntry(const Anope::string &mask) { std::multimap<Anope::string, XLine *, ci::less>::iterator it = XLinesByUID->find(mask); if (it != XLinesByUID->end()) |