aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorGravatar Sadie Powell2026-03-26 22:24:16 +0000
committerGravatar Sadie Powell2026-03-26 22:24:16 +0000
commitcd2d667ca7d3d31dbcf1f3bf0717b744b11ec776 (patch)
tree2d510e98b89d9fb7a74b7ed44dede89ef5d3b50e /include
parentMerge branch 'insp4' into master. (diff)
Switch typedefs to using statements.
Diffstat (limited to 'include')
-rw-r--r--include/bancache.h2
-rw-r--r--include/channels.h2
-rw-r--r--include/clientprotocol.h4
-rw-r--r--include/configparser.h2
-rw-r--r--include/configreader.h8
-rw-r--r--include/event.h2
-rw-r--r--include/extensible.h2
-rw-r--r--include/extension.h2
-rw-r--r--include/flat_map.h60
-rw-r--r--include/intrusive_list_impl.h2
-rw-r--r--include/listmode.h4
-rw-r--r--include/logging.h2
-rw-r--r--include/membership.h2
-rw-r--r--include/mode.h14
-rw-r--r--include/modechange.h2
-rw-r--r--include/modules.h2
-rw-r--r--include/modules/cap.h4
-rw-r--r--include/modules/cloak.h4
-rw-r--r--include/modules/dns.h2
-rw-r--r--include/modules/extban.h2
-rw-r--r--include/modules/invite.h2
-rw-r--r--include/modules/ircv3_batch.h2
-rw-r--r--include/modules/ldap.h4
-rw-r--r--include/modules/regex.h6
-rw-r--r--include/modules/reload.h2
-rw-r--r--include/modules/sql.h8
-rw-r--r--include/protocol.h2
-rw-r--r--include/socket.h8
-rw-r--r--include/socketengine.h4
-rw-r--r--include/streamsocket.h6
-rw-r--r--include/stringutils.h2
-rw-r--r--include/timer.h2
-rw-r--r--include/typedefs.h12
-rw-r--r--include/usermanager.h8
-rw-r--r--include/users.h6
-rw-r--r--include/xline.h10
36 files changed, 104 insertions, 104 deletions
diff --git a/include/bancache.h b/include/bancache.h
index faee0bf58..d9c26e70e 100644
--- a/include/bancache.h
+++ b/include/bancache.h
@@ -56,7 +56,7 @@ class CoreExport BanCacheManager final
{
/** A container of ban cache items.
*/
- typedef std::unordered_map<std::string, BanCacheHit*> BanCacheHash;
+ using BanCacheHash = std::unordered_map<std::string, BanCacheHit*>;
BanCacheHash BanHash;
bool RemoveIfExpired(BanCacheHash::iterator& it);
diff --git a/include/channels.h b/include/channels.h
index bff93581a..bec71ecd1 100644
--- a/include/channels.h
+++ b/include/channels.h
@@ -44,7 +44,7 @@ class CoreExport Channel final
public:
/** A map of Memberships on a channel keyed by User pointers
*/
- typedef std::unordered_map<User*, insp::aligned_storage<Membership>> MemberMap;
+ using MemberMap = std::unordered_map<User*, insp::aligned_storage<Membership>>;
private:
/** Modes for the channel.
diff --git a/include/clientprotocol.h b/include/clientprotocol.h
index 7be110f07..7c2ed6365 100644
--- a/include/clientprotocol.h
+++ b/include/clientprotocol.h
@@ -290,7 +290,7 @@ public:
bool IsOwned() const { return owned; }
};
- typedef std::vector<Param> ParamList;
+ using ParamList = std::vector<Param>;
/** Escapes a value to the tag format.
* @param value The value to escape.
@@ -303,7 +303,7 @@ public:
static std::string UnescapeTag(const std::string& value);
private:
- typedef std::vector<std::pair<SerializedInfo, SerializedMessage>> SerializedList;
+ using SerializedList = std::vector<std::pair<SerializedInfo, SerializedMessage>>;
ParamList params;
TagMap tags;
diff --git a/include/configparser.h b/include/configparser.h
index adcc880f6..67c1b3579 100644
--- a/include/configparser.h
+++ b/include/configparser.h
@@ -22,7 +22,7 @@
#pragma once
-typedef std::unique_ptr<FILE, int(*)(FILE*)> FilePtr;
+using FilePtr = std::unique_ptr<FILE, int(*)(FILE*)>;
struct ParseStack final
{
diff --git a/include/configreader.h b/include/configreader.h
index ee085185a..69d30a253 100644
--- a/include/configreader.h
+++ b/include/configreader.h
@@ -404,16 +404,16 @@ public:
};
/** Holds the connect classes from the server config. */
- typedef std::vector<std::shared_ptr<ConnectClass>> ClassVector;
+ using ClassVector = std::vector<std::shared_ptr<ConnectClass>>;
/** Holds the oper accounts from the server config. */
- typedef insp::flat_map<std::string, std::shared_ptr<OperAccount>> OperAccountMap;
+ using OperAccountMap = insp::flat_map<std::string, std::shared_ptr<OperAccount>>;
/** Holds the oper types from the server config. */
- typedef insp::flat_map<std::string, std::shared_ptr<OperType>> OperTypeMap;
+ using OperTypeMap = insp::flat_map<std::string, std::shared_ptr<OperType>>;
/** Holds iterators to a subsection of the server config map. */
- typedef insp::iterator_range<TagMap::const_iterator> TagList;
+ using TagList = insp::iterator_range<TagMap::const_iterator>;
/** The connect classes from the server config. */
ClassVector Classes;
diff --git a/include/event.h b/include/event.h
index 887f73221..2da3e509c 100644
--- a/include/event.h
+++ b/include/event.h
@@ -49,7 +49,7 @@ public:
bool operator()(ModuleEventListener* lhs, ModuleEventListener* rhs) const;
};
- typedef insp::flat_multiset<ModuleEventListener*, Comp, ElementComp> SubscriberList;
+ using SubscriberList = insp::flat_multiset<ModuleEventListener*, Comp, ElementComp>;
/** Constructor
* @param mod Module providing the event(s)
diff --git a/include/extensible.h b/include/extensible.h
index 10ccbd3de..4e299d7dc 100644
--- a/include/extensible.h
+++ b/include/extensible.h
@@ -44,7 +44,7 @@ class CoreExport Extensible
{
public:
/** The container which extension values are stored in. */
- typedef insp::flat_map<ExtensionItem*, void*> ExtensibleStore;
+ using ExtensibleStore = insp::flat_map<ExtensionItem*, void*>;
/** Allows extensions to access the extension store. */
friend class ExtensionItem;
diff --git a/include/extension.h b/include/extension.h
index 1437a7b7d..cff6ab878 100644
--- a/include/extension.h
+++ b/include/extension.h
@@ -299,7 +299,7 @@ class ListExtItem
{
public:
/** The underlying list type. */
- typedef Container List;
+ using List = Container;
/** Initializes an instance of the ListExtItem class.
* @param owner The module which created the extension.
diff --git a/include/flat_map.h b/include/flat_map.h
index 9dd394f12..1b4cfd36a 100644
--- a/include/flat_map.h
+++ b/include/flat_map.h
@@ -30,8 +30,8 @@ template <typename T, typename Comp>
class map_pair_compare final
: public Comp
{
- typedef T value_type;
- typedef typename value_type::first_type key_type;
+ using value_type = T;
+ using key_type = typename value_type::first_type;
public:
bool operator()(const value_type& x, const value_type& y) const
@@ -65,22 +65,22 @@ template <typename T, typename Comp, typename Key = T, typename ElementComp = Co
class flat_map_base
{
protected:
- typedef std::vector<T> storage_type;
+ using storage_type = std::vector<T>;
storage_type vect;
public:
- typedef typename storage_type::iterator iterator;
- typedef typename storage_type::const_iterator const_iterator;
- typedef typename storage_type::reverse_iterator reverse_iterator;
- typedef typename storage_type::const_reverse_iterator const_reverse_iterator;
+ using iterator = typename storage_type::iterator;
+ using const_iterator = typename storage_type::const_iterator;
+ using reverse_iterator = typename storage_type::reverse_iterator;
+ using const_reverse_iterator = typename storage_type::const_reverse_iterator;
- typedef typename storage_type::size_type size_type;
- typedef typename storage_type::difference_type difference_type;
- typedef Key key_type;
- typedef T value_type;
+ using size_type = typename storage_type::size_type;
+ using difference_type = typename storage_type::difference_type;
+ using key_type = Key;
+ using value_type = T;
- typedef Comp key_compare;
- typedef ElementComp value_compare;
+ using key_compare = Comp;
+ using value_compare = ElementComp;
flat_map_base() = default;
@@ -205,11 +205,11 @@ template <typename T, typename Comp = std::less<T>, typename ElementComp = Comp>
class flat_set
: public detail::flat_map_base<T, Comp, T, ElementComp>
{
- typedef detail::flat_map_base<T, Comp, T, ElementComp> base_type;
+ using base_type = detail::flat_map_base<T, Comp, T, ElementComp>;
public:
- typedef typename base_type::iterator iterator;
- typedef typename base_type::value_type value_type;
+ using iterator = typename base_type::iterator;
+ using value_type = typename base_type::value_type;
flat_set() = default;
@@ -260,11 +260,11 @@ template <typename T, typename Comp = std::less<T>, typename ElementComp = Comp>
class flat_multiset
: public detail::flat_map_base<T, Comp, T, ElementComp>
{
- typedef detail::flat_map_base<T, Comp, T, ElementComp> base_type;
+ using base_type = detail::flat_map_base<T, Comp, T, ElementComp>;
public:
- typedef typename base_type::iterator iterator;
- typedef typename base_type::value_type value_type;
+ using iterator = typename base_type::iterator;
+ using value_type = typename base_type::value_type;
flat_multiset() = default;
@@ -315,14 +315,14 @@ template <typename T, typename U, typename Comp = std::less<T>, typename Element
class flat_map
: public detail::flat_map_base<std::pair<T, U>, Comp, T, detail::map_pair_compare<std::pair<T, U>, ElementComp>>
{
- typedef detail::flat_map_base<std::pair<T, U>, Comp, T, detail::map_pair_compare<std::pair<T, U>, ElementComp>> base_type;
+ using base_type = detail::flat_map_base<std::pair<T, U>, Comp, T, detail::map_pair_compare<std::pair<T, U>, ElementComp>>;
public:
- typedef typename base_type::iterator iterator;
- typedef typename base_type::key_type key_type;
- typedef typename base_type::value_type value_type;
- typedef U mapped_type;
- typedef typename base_type::value_compare value_compare;
+ using iterator = typename base_type::iterator;
+ using key_type = typename base_type::key_type;
+ using value_type = typename base_type::value_type;
+ using mapped_type = U;
+ using value_compare = typename base_type::value_compare;
flat_map() = default;
@@ -383,13 +383,13 @@ template <typename T, typename U, typename Comp = std::less<T>, typename Element
class flat_multimap
: public detail::flat_map_base<std::pair<T, U>, Comp, T, detail::map_pair_compare<std::pair<T, U>, ElementComp>>
{
- typedef detail::flat_map_base<std::pair<T, U>, Comp, T, detail::map_pair_compare<std::pair<T, U>, ElementComp>> base_type;
+ using base_type = detail::flat_map_base<std::pair<T, U>, Comp, T, detail::map_pair_compare<std::pair<T, U>, ElementComp>>;
public:
- typedef typename base_type::iterator iterator;
- typedef typename base_type::value_type value_type;
- typedef U mapped_type;
- typedef typename base_type::value_compare value_compare;
+ using iterator = typename base_type::iterator;
+ using value_type = typename base_type::value_type;
+ using mapped_type = U;
+ using value_compare = typename base_type::value_compare;
flat_multimap() = default;
diff --git a/include/intrusive_list_impl.h b/include/intrusive_list_impl.h
index 940626ddf..4aa20817e 100644
--- a/include/intrusive_list_impl.h
+++ b/include/intrusive_list_impl.h
@@ -72,7 +72,7 @@ public:
T* operator*() const { return curr; }
};
- typedef iterator const_iterator;
+ using const_iterator = iterator;
bool empty() const
{
diff --git a/include/listmode.h b/include/listmode.h
index 6a7ebe913..cc8d4d03e 100644
--- a/include/listmode.h
+++ b/include/listmode.h
@@ -46,7 +46,7 @@ public:
/** Items stored in the channel's list
*/
- typedef std::vector<ListItem> ModeList;
+ using ModeList = std::vector<ListItem>;
private:
class ChanData final
@@ -73,7 +73,7 @@ private:
/** Max items per channel by name
*/
- typedef std::vector<ListLimit> limitlist;
+ using limitlist = std::vector<ListLimit>;
/** The default maximum list size. */
static constexpr unsigned int DEFAULT_LIST_SIZE = 100;
diff --git a/include/logging.h b/include/logging.h
index c53bf8c82..69d13a111 100644
--- a/include/logging.h
+++ b/include/logging.h
@@ -31,7 +31,7 @@ namespace Log
class Manager;
/** A shared pointer to a log method. */
- typedef std::shared_ptr<Method> MethodPtr;
+ using MethodPtr = std::shared_ptr<Method>;
/** Levels at which messages can be logged. */
enum class Level
diff --git a/include/membership.h b/include/membership.h
index 7153f2d00..8926430e1 100644
--- a/include/membership.h
+++ b/include/membership.h
@@ -38,7 +38,7 @@ class CoreExport Membership final
public:
/** Type of the Membership id
*/
- typedef uint64_t Id;
+ using Id = uint64_t;
/** User on the channel
*/
diff --git a/include/mode.h b/include/mode.h
index 71a590625..d2732629c 100644
--- a/include/mode.h
+++ b/include/mode.h
@@ -92,10 +92,10 @@ class CoreExport ModeHandler
{
public:
/** The underlying type of a mode rank. */
- typedef unsigned long Rank;
+ using Rank = unsigned long;
/** The underlying type of a mode id. */
- typedef size_t Id;
+ using Id = size_t;
enum Class
{
@@ -569,12 +569,12 @@ public:
using ModeHandlerMap = insp::casemapped_unordered_map<ModeHandler*>;
/** Type of the container that contains whether a mode is set. */
- typedef std::bitset<MODEID_MAX> ModeStatus;
+ using ModeStatus = std::bitset<MODEID_MAX>;
private:
/** Type of the container that maps mode names to ModeWatchers
*/
- typedef insp::flat_multimap<std::string, ModeWatcher*> ModeWatcherMap;
+ using ModeWatcherMap = insp::flat_multimap<std::string, ModeWatcher*>;
/** Last item in the ModeType enum
*/
@@ -629,10 +629,10 @@ private:
ModeHandler::Id AllocateModeId(ModeHandler* mh);
public:
- typedef std::vector<ListModeBase*> ListModeList;
- typedef std::vector<PrefixMode*> PrefixModeList;
+ using ListModeList = std::vector<ListModeBase*>;
+ using PrefixModeList = std::vector<PrefixMode*>;
- typedef unsigned int ModeProcessFlag;
+ using ModeProcessFlag = unsigned int;
enum ModeProcessFlags
{
/** If only this flag is specified, the mode change will be global
diff --git a/include/modechange.h b/include/modechange.h
index 561912c56..753c241cb 100644
--- a/include/modechange.h
+++ b/include/modechange.h
@@ -70,7 +70,7 @@ struct Modes::Change final
class Modes::ChangeList final
{
public:
- typedef std::vector<Change> List;
+ using List = std::vector<Change>;
/** Add a new mode to be changed to this ChangeList
* @param change Mode change to add
diff --git a/include/modules.h b/include/modules.h
index a3973705c..17011011b 100644
--- a/include/modules.h
+++ b/include/modules.h
@@ -243,7 +243,7 @@ public:
using LinkDataDiff = insp::casemapped_map<std::pair<std::optional<std::string>, std::optional<std::string>>>;
/** A list of modules. */
- typedef std::vector<Module*> List;
+ using List = std::vector<Module*>;
/** Reference to the dynamic library. */
DLLManager* ModuleDLL = nullptr;
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
diff --git a/include/protocol.h b/include/protocol.h
index 9520aaa4d..381e4bdc4 100644
--- a/include/protocol.h
+++ b/include/protocol.h
@@ -30,7 +30,7 @@ class User;
class CoreExport ProtocolInterface
{
public:
- typedef std::vector<Server*> ServerList;
+ using ServerList = std::vector<Server*>;
virtual ~ProtocolInterface() = default;
diff --git a/include/socket.h b/include/socket.h
index 332bd6776..e869852b1 100644
--- a/include/socket.h
+++ b/include/socket.h
@@ -34,8 +34,8 @@
# include <sys/un.h>
#else
# include <afunix.h>
-typedef USHORT in_port_t;
-typedef ADDRESS_FAMILY sa_family_t;
+using in_port_t = USHORT;
+using sa_family_t = ADDRESS_FAMILY;
#endif
#include <cerrno>
@@ -185,7 +185,7 @@ struct CoreExport FailedPort final
};
/** A list of failed port bindings, used for informational purposes on startup */
-typedef std::vector<FailedPort> FailedPortList;
+using FailedPortList = std::vector<FailedPort>;
#include "socketengine.h"
@@ -210,7 +210,7 @@ public:
}
};
- typedef std::array<IOHookProvRef, 2> IOHookProvList;
+ using IOHookProvList = std::array<IOHookProvRef, 2>;
/** IOHook providers for handling connections on this socket,
* may be empty.
diff --git a/include/socketengine.h b/include/socketengine.h
index ee68def06..ff5876f45 100644
--- a/include/socketengine.h
+++ b/include/socketengine.h
@@ -297,9 +297,9 @@ private:
public:
#ifndef _WIN32
- typedef iovec IOVector;
+ using IOVector = iovec;
#else
- typedef WindowsIOVec IOVector;
+ using IOVector = WindowsIOVec;
#endif
/** Constructor.
diff --git a/include/streamsocket.h b/include/streamsocket.h
index 216c1c816..60f21e97e 100644
--- a/include/streamsocket.h
+++ b/include/streamsocket.h
@@ -123,15 +123,15 @@ public:
public:
/** One element of the queue, a continuous buffer
*/
- typedef std::string Element;
+ using Element = std::string;
/** Sequence container of buffers in the queue
*/
- typedef std::deque<Element> Container;
+ using Container = std::deque<Element>;
/** Container iterator
*/
- typedef Container::const_iterator const_iterator;
+ using const_iterator = Container::const_iterator;
/** Return whether the queue is empty
* @return True if the queue is empty, false otherwise
diff --git a/include/stringutils.h b/include/stringutils.h
index 55965ad7a..c2e79964d 100644
--- a/include/stringutils.h
+++ b/include/stringutils.h
@@ -162,7 +162,7 @@ namespace Percent
namespace Template
{
/** A mapping of variable names to their values. */
- typedef insp::flat_map<std::string, std::string> VariableMap;
+ using VariableMap = insp::flat_map<std::string, std::string>;
/** Replaces template variables like %foo% within a string.
* @param str The string to template from.
diff --git a/include/timer.h b/include/timer.h
index 2b8e91eb8..ae9f5b272 100644
--- a/include/timer.h
+++ b/include/timer.h
@@ -120,7 +120,7 @@ public:
*/
class CoreExport TimerManager final
{
- typedef std::multimap<time_t, Timer*> TimerMap;
+ using TimerMap = std::multimap<time_t, Timer*>;
/** A list of all pending timers
*/
diff --git a/include/typedefs.h b/include/typedefs.h
index 8e6b6aa6d..1d1db99f5 100644
--- a/include/typedefs.h
+++ b/include/typedefs.h
@@ -52,9 +52,9 @@ namespace ClientProtocol
class MessageTagProvider;
class Serializer;
- typedef std::vector<Message*> MessageList;
- typedef std::vector<std::string> ParamList;
- typedef std::string SerializedMessage;
+ using MessageList = std::vector<Message*>;
+ using ParamList = std::vector<std::string>;
+ using SerializedMessage = std::string;
struct CoreExport MessageTagData final
{
@@ -69,13 +69,13 @@ namespace ClientProtocol
* Sorted in descending order to ensure tag names beginning with symbols (such as '+') come later when iterating
* the container than tags with a normal name.
*/
- typedef insp::flat_map<std::string, MessageTagData, std::greater<>> TagMap;
+ using TagMap = insp::flat_map<std::string, MessageTagData, std::greater<>>;
}
#include "base.h"
/** Generic user list, used for exceptions */
-typedef std::set<User*> CUList;
+using CUList = std::set<User*>;
/** A bitset of characters which are enabled/set. */
-typedef std::bitset<UCHAR_MAX + 1> CharState;
+using CharState = std::bitset<UCHAR_MAX + 1>;
diff --git a/include/usermanager.h b/include/usermanager.h
index ae9f16250..429c72ae8 100644
--- a/include/usermanager.h
+++ b/include/usermanager.h
@@ -40,18 +40,18 @@ public:
/** Container that maps IP addresses to clone counts
*/
- typedef std::map<irc::sockets::cidr_mask, CloneCounts> CloneMap;
+ using CloneMap = std::map<irc::sockets::cidr_mask, CloneCounts>;
/** Sequence container in which each element is a User*
*/
- typedef std::vector<User*> OperList;
+ using OperList = std::vector<User*>;
/** A list containing users who are on a services server. */
- typedef std::vector<User*> ServiceList;
+ using ServiceList = std::vector<User*>;
/** A list holding local users
*/
- typedef insp::intrusive_list<LocalUser> LocalList;
+ using LocalList = insp::intrusive_list<LocalUser>;
private:
/** Map of IP addresses for clone counting
diff --git a/include/users.h b/include/users.h
index 8d567df6b..ca3adb7bd 100644
--- a/include/users.h
+++ b/include/users.h
@@ -414,13 +414,13 @@ public:
/** List of Memberships for this user
*/
- typedef insp::intrusive_list<Membership> ChanList;
+ using ChanList = insp::intrusive_list<Membership>;
/** A list of memberships to consider when discovering the neighbors of a user. */
- typedef std::vector<Membership*> NeighborList;
+ using NeighborList = std::vector<Membership*>;
/** A list of exceptions to the memberships that are considered when discovering the neighbours of a user. */
- typedef std::unordered_map<User*, bool> NeighborExceptions;
+ using NeighborExceptions = std::unordered_map<User*, bool>;
/** The time at which this user's nickname was last changed. */
time_t nickchanged;
diff --git a/include/xline.h b/include/xline.h
index 22547bdaa..53c97da20 100644
--- a/include/xline.h
+++ b/include/xline.h
@@ -32,11 +32,11 @@ namespace Stats
/** Contains a username and hostname split into two strings
*/
-typedef std::pair<std::string, std::string> UserHostPair;
+using UserHostPair = std::pair<std::string, std::string>;
/** A map of xline factories
*/
-typedef std::map<std::string, XLineFactory*> XLineFactMap;
+using XLineFactMap = std::map<std::string, XLineFactory*>;
/** A map of XLines indexed by string
*/
@@ -44,15 +44,15 @@ using XLineLookup = insp::casemapped_map<XLine*>;
/** A map of XLineLookup maps indexed by string
*/
-typedef std::map<std::string, XLineLookup > XLineContainer;
+using XLineContainer = std::map<std::string, XLineLookup >;
/** An iterator in an XLineContainer
*/
-typedef XLineContainer::iterator ContainerIter;
+using ContainerIter = XLineContainer::iterator;
/** An iterator in an XLineLookup
*/
-typedef XLineLookup::iterator LookupIter;
+using LookupIter = XLineLookup::iterator;
/** XLine is the base class for ban lines such as G-lines and Z-lines.
* Modules may derive from this, and their xlines will automatically be