diff options
| author | 2026-03-26 22:24:16 +0000 | |
|---|---|---|
| committer | 2026-03-26 22:24:16 +0000 | |
| commit | cd2d667ca7d3d31dbcf1f3bf0717b744b11ec776 (patch) | |
| tree | 2d510e98b89d9fb7a74b7ed44dede89ef5d3b50e /include/modules | |
| parent | Merge branch 'insp4' into master. (diff) | |
Switch typedefs to using statements.
Diffstat (limited to 'include/modules')
| -rw-r--r-- | include/modules/cap.h | 4 | ||||
| -rw-r--r-- | include/modules/cloak.h | 4 | ||||
| -rw-r--r-- | include/modules/dns.h | 2 | ||||
| -rw-r--r-- | include/modules/extban.h | 2 | ||||
| -rw-r--r-- | include/modules/invite.h | 2 | ||||
| -rw-r--r-- | include/modules/ircv3_batch.h | 2 | ||||
| -rw-r--r-- | include/modules/ldap.h | 4 | ||||
| -rw-r--r-- | include/modules/regex.h | 6 | ||||
| -rw-r--r-- | include/modules/reload.h | 2 | ||||
| -rw-r--r-- | include/modules/sql.h | 8 |
10 files changed, 18 insertions, 18 deletions
diff --git a/include/modules/cap.h b/include/modules/cap.h index dbeedc27f..63d5f8c0b 100644 --- a/include/modules/cap.h +++ b/include/modules/cap.h @@ -28,7 +28,7 @@ namespace Cap static constexpr intptr_t CAP_302_BIT = (intptr_t)1 << MAX_CAPS; static constexpr unsigned int MAX_VALUE_LENGTH = 100; - typedef intptr_t Ext; + using Ext = intptr_t; class ExtItem : public IntExtItem { public: @@ -118,7 +118,7 @@ namespace Cap */ class Capability : public ServiceProvider, private dynamic_reference_base::CaptureHook { - typedef size_t Bit; + using Bit = size_t; /** Bit allocated to this cap, undefined if the cap is unregistered */ diff --git a/include/modules/cloak.h b/include/modules/cloak.h index 882fc6701..38381a25a 100644 --- a/include/modules/cloak.h +++ b/include/modules/cloak.h @@ -31,10 +31,10 @@ namespace Cloak struct Info; /** Encapsulates a list of cloaks. */ - typedef std::vector<Info> List; + using List = std::vector<Info>; /** A shared pointer to a cloak method. */ - typedef std::shared_ptr<Method> MethodPtr; + using MethodPtr = std::shared_ptr<Method>; /** Takes a hostname and retrieves the part which should be visible. * diff --git a/include/modules/dns.h b/include/modules/dns.h index 8e8ac23ea..da700f50d 100644 --- a/include/modules/dns.h +++ b/include/modules/dns.h @@ -76,7 +76,7 @@ namespace DNS ERROR_INVALIDTYPE }; - typedef uint16_t RequestId; + using RequestId = uint16_t; const int PORT = 53; diff --git a/include/modules/extban.h b/include/modules/extban.h index 944974ace..4f807d844 100644 --- a/include/modules/extban.h +++ b/include/modules/extban.h @@ -128,7 +128,7 @@ protected: public: /** A mapping of extban letters to their associated object. */ - typedef std::unordered_map<ExtBan::Letter, ExtBan::Base*> LetterMap; + using LetterMap = std::unordered_map<ExtBan::Letter, ExtBan::Base*>; /** A mapping of extban names to their associated objects. */ using NameMap = insp::casemapped_unordered_map<ExtBan::Base*>; diff --git a/include/modules/invite.h b/include/modules/invite.h index 7b492201a..15fac9c0b 100644 --- a/include/modules/invite.h +++ b/include/modules/invite.h @@ -43,7 +43,7 @@ namespace Invite ANNOUNCE_DYNAMIC }; - typedef insp::intrusive_list<Invite, LocalUser> List; + using List = insp::intrusive_list<Invite, LocalUser>; } class Invite::APIBase diff --git a/include/modules/ircv3_batch.h b/include/modules/ircv3_batch.h index 3b8796912..bff4a25f3 100644 --- a/include/modules/ircv3_batch.h +++ b/include/modules/ircv3_batch.h @@ -26,7 +26,7 @@ namespace IRCv3 { namespace Batch { - typedef uint64_t RefTag; + using RefTag = uint64_t; class Manager; class ManagerImpl; class Batch; diff --git a/include/modules/ldap.h b/include/modules/ldap.h index 9563eabd1..d7399eb03 100644 --- a/include/modules/ldap.h +++ b/include/modules/ldap.h @@ -19,7 +19,7 @@ #pragma once -typedef int LDAPQuery; +using LDAPQuery = int; // XXX: This should be using ModuleException. class LDAPException final @@ -46,7 +46,7 @@ struct LDAPModification final std::vector<std::string> values; }; -typedef std::vector<LDAPModification> LDAPMods; +using LDAPMods = std::vector<LDAPModification>; struct LDAPAttributes final : public std::map<std::string, std::vector<std::string>> diff --git a/include/modules/regex.h b/include/modules/regex.h index 793bb2c5d..94cee3070 100644 --- a/include/modules/regex.h +++ b/include/modules/regex.h @@ -31,13 +31,13 @@ namespace Regex template<typename> class SimpleEngine; /** A list of matches that were captured by index. */ - typedef std::vector<std::string> Captures; + using Captures = std::vector<std::string>; /** A list of matches that were captured by name. */ - typedef insp::flat_map<std::string, std::string> NamedCaptures; + using NamedCaptures = insp::flat_map<std::string, std::string>; /** A shared pointer to a regex pattern. */ - typedef std::shared_ptr<Pattern> PatternPtr; + using PatternPtr = std::shared_ptr<Pattern>; /** The options to use when matching a pattern. */ enum PatternOptions diff --git a/include/modules/reload.h b/include/modules/reload.h index 415f4d963..1670237dd 100644 --- a/include/modules/reload.h +++ b/include/modules/reload.h @@ -39,7 +39,7 @@ namespace ReloadModule { } }; - typedef std::vector<Data> List; + using List = std::vector<Data>; List list; public: diff --git a/include/modules/sql.h b/include/modules/sql.h index be2cf0005..beb37e233 100644 --- a/include/modules/sql.h +++ b/include/modules/sql.h @@ -30,16 +30,16 @@ namespace SQL class Result; /** A list of parameter replacement values. */ - typedef std::vector<std::string> ParamList; + using ParamList = std::vector<std::string>; /** A map of parameter replacement values. */ - typedef std::map<std::string, std::string> ParamMap; + using ParamMap = std::map<std::string, std::string>; /** A single SQL field. */ - typedef std::optional<std::string> Field; + using Field = std::optional<std::string>; /** A list of SQL fields from a specific row. */ - typedef std::vector<Field> Row; + using Row = std::vector<Field>; /** An enumeration of possible error codes. */ enum ErrorCode |
