aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorGravatar Sadie Powell2022-07-22 18:33:38 +0100
committerGravatar Sadie Powell2022-07-22 18:53:21 +0100
commit648f813f8c89e6e7d0ed5bda2c2149bee2babb09 (patch)
tree5357669e57bb381c80bfdbd24ed4057a99db8e5b /include
parentUpdate author list. (diff)
Switch from NULL to nullptr.
Diffstat (limited to 'include')
-rw-r--r--include/base.h2
-rw-r--r--include/channels.h4
-rw-r--r--include/clientprotocol.h50
-rw-r--r--include/clientprotocolmsg.h12
-rw-r--r--include/command_parse.h6
-rw-r--r--include/configreader.h2
-rw-r--r--include/dynref.h2
-rw-r--r--include/inspircd.h10
-rw-r--r--include/inspsocket.h2
-rw-r--r--include/intrusive_list.h2
-rw-r--r--include/intrusive_list_impl.h2
-rw-r--r--include/iohook.h2
-rw-r--r--include/listmode.h2
-rw-r--r--include/mode.h12
-rw-r--r--include/modules.h2
-rw-r--r--include/modules/cap.h8
-rw-r--r--include/modules/dns.h2
-rw-r--r--include/modules/invite.h4
-rw-r--r--include/modules/ircv3_batch.h2
-rw-r--r--include/modules/ssl.h4
-rw-r--r--include/protocol.h4
-rw-r--r--include/socket.h2
-rw-r--r--include/stdalgo.h2
-rw-r--r--include/typedefs.h2
-rw-r--r--include/usermanager.h2
25 files changed, 72 insertions, 72 deletions
diff --git a/include/base.h b/include/base.h
index f1fd1dbff..a2fb9f06a 100644
--- a/include/base.h
+++ b/include/base.h
@@ -116,7 +116,7 @@ public:
return *this;
}
- inline operator bool() const { return (value != NULL); }
+ inline operator bool() const { return (value != nullptr); }
inline operator T*() const { return value; }
inline T* operator->() const { return value; }
inline T& operator*() const { return *value; }
diff --git a/include/channels.h b/include/channels.h
index 3df64a060..4170ce34b 100644
--- a/include/channels.h
+++ b/include/channels.h
@@ -146,7 +146,7 @@ public:
* @param setter Setter string, may be used when the original setter is no longer online.
* If omitted or NULL, the setter string is obtained from the user.
*/
- void SetTopic(User* user, const std::string& topic, time_t topicts, const std::string* setter = NULL);
+ void SetTopic(User* user, const std::string& topic, time_t topicts, const std::string* setter = nullptr);
/** Obtain the channel "user counter"
* This returns the number of users on this channel
@@ -233,7 +233,7 @@ public:
* @param created_by_local True if this channel was just created by a local user (passed to modules in the OnUserJoin hook)
* @return A newly created Membership object, or NULL if the user was already inside the channel or if the user is a server user
*/
- Membership* ForceJoin(User* user, const std::string* privs = NULL, bool bursting = false, bool created_by_local = false);
+ Membership* ForceJoin(User* user, const std::string* privs = nullptr, bool bursting = false, bool created_by_local = false);
/** Write to all users on a channel except some users
* @param protoev Event to send, may contain any number of messages.
diff --git a/include/clientprotocol.h b/include/clientprotocol.h
index 578b24abb..5aab4b0a3 100644
--- a/include/clientprotocol.h
+++ b/include/clientprotocol.h
@@ -101,7 +101,7 @@ public:
* @param Sourceuser User to set as source of the message. If NULL, the message won't have a source when serialized.
* Optional, defaults to NULL.
*/
- MessageSource(User* Sourceuser = NULL)
+ MessageSource(User* Sourceuser = nullptr)
{
SetSourceUser(Sourceuser);
}
@@ -113,7 +113,7 @@ public:
* if provided it may be used internally, for example to create message tags.
* Useful when the source string is synthesized but it is still related to a User.
*/
- MessageSource(const std::string& Sourcestr, User* Sourceuser = NULL)
+ MessageSource(const std::string& Sourcestr, User* Sourceuser = nullptr)
{
SetSource(Sourcestr, Sourceuser);
}
@@ -128,7 +128,7 @@ public:
return sourcestr;
if (sourceuser)
return &sourceuser->GetFullHost();
- return NULL;
+ return nullptr;
}
/** Get the source User.
@@ -144,7 +144,7 @@ public:
void SetSourceUser(User* Sourceuser)
{
sourceuser = Sourceuser;
- sourcestr = NULL;
+ sourcestr = nullptr;
}
/** Set the source string and optionally source user.
@@ -153,7 +153,7 @@ public:
* as this object is alive.
* @param Sourceuser Source user to set, optional.
*/
- void SetSource(const std::string& Sourcestr, User* Sourceuser = NULL)
+ void SetSource(const std::string& Sourcestr, User* Sourceuser = nullptr)
{
sourcestr = &Sourcestr;
sourceuser = Sourceuser;
@@ -240,14 +240,14 @@ public:
}
Param(int, const char* s)
- : ptr(NULL)
+ : ptr(nullptr)
, owned(true)
{
new(str) std::string(s);
}
Param(int, const std::string& s)
- : ptr(NULL)
+ : ptr(nullptr)
, owned(true)
{
new(str) std::string(s);
@@ -309,7 +309,7 @@ public:
* with SetCommand() before the message is serialized.
* @param Sourceuser See the one parameter constructor of MessageSource for description.
*/
- Message(const char* cmd, User* Sourceuser = NULL)
+ Message(const char* cmd, User* Sourceuser = nullptr)
: ClientProtocol::MessageSource(Sourceuser)
, command(cmd ? cmd : std::string())
{
@@ -324,7 +324,7 @@ public:
* Must remain valid as long as this object is alive.
* @param Sourceuser See the two parameter constructor of MessageSource for description.
*/
- Message(const char* cmd, const std::string& Sourcestr, User* Sourceuser = NULL)
+ Message(const char* cmd, const std::string& Sourcestr, User* Sourceuser = nullptr)
: ClientProtocol::MessageSource(Sourcestr, Sourceuser)
, command(cmd ? cmd : std::string())
{
@@ -403,7 +403,7 @@ public:
* @param val Tag value. If empty no value will be sent with the tag.
* @param tagdata Tag provider specific data, will be passed to MessageTagProvider::ShouldSendTag(). Optional, defaults to NULL.
*/
- void AddTag(const std::string& tagname, MessageTagProvider* tagprov, const std::string& val, void* tagdata = NULL)
+ void AddTag(const std::string& tagname, MessageTagProvider* tagprov, const std::string& val, void* tagdata = nullptr)
{
tags.emplace(tagname, MessageTagData(tagprov, val, tagdata));
}
@@ -499,7 +499,7 @@ public:
void SetMessage(Message* msg)
{
initialmsg = msg;
- initialmsglist = NULL;
+ initialmsglist = nullptr;
}
/** Set a list of messages as the initial messages in the event.
@@ -507,7 +507,7 @@ public:
*/
void SetMessageList(const MessageList& msglist)
{
- initialmsg = NULL;
+ initialmsg = nullptr;
initialmsglist = &msglist;
}
@@ -662,19 +662,19 @@ struct ClientProtocol::RFCEvents final
EventProvider error;
RFCEvents()
- : numeric(NULL, "NUMERIC")
- , join(NULL, "JOIN")
- , part(NULL, "PART")
- , kick(NULL, "KICK")
- , quit(NULL, "QUIT")
- , nick(NULL, "NICK")
- , mode(NULL, "MODE")
- , topic(NULL, "TOPIC")
- , privmsg(NULL, "PRIVMSG")
- , invite(NULL, "INVITE")
- , ping(NULL, "PING")
- , pong(NULL, "PONG")
- , error(NULL, "ERROR")
+ : numeric(nullptr, "NUMERIC")
+ , join(nullptr, "JOIN")
+ , part(nullptr, "PART")
+ , kick(nullptr, "KICK")
+ , quit(nullptr, "QUIT")
+ , nick(nullptr, "NICK")
+ , mode(nullptr, "MODE")
+ , topic(nullptr, "TOPIC")
+ , privmsg(nullptr, "PRIVMSG")
+ , invite(nullptr, "INVITE")
+ , ping(nullptr, "PING")
+ , pong(nullptr, "PONG")
+ , error(nullptr, "ERROR")
{
}
};
diff --git a/include/clientprotocolmsg.h b/include/clientprotocolmsg.h
index c0a85a792..22a462b63 100644
--- a/include/clientprotocolmsg.h
+++ b/include/clientprotocolmsg.h
@@ -69,7 +69,7 @@ public:
* @param user User to send the numeric to. May be unregistered, must remain valid as long as this object is alive.
*/
Numeric(const ::Numeric::Numeric& num, User* user)
- : ClientProtocol::Message(NULL, (num.GetServer() ? num.GetServer() : ServerInstance->FakeClient->server)->GetPublicName())
+ : ClientProtocol::Message(nullptr, (num.GetServer() ? num.GetServer() : ServerInstance->FakeClient->server)->GetPublicName())
{
if (user->registered & REG_NICK)
PushParamRef(user->nick);
@@ -83,7 +83,7 @@ public:
* @param target Target string, must stay valid as long as this object is alive.
*/
Numeric(const ::Numeric::Numeric& num, const std::string& target)
- : ClientProtocol::Message(NULL, (num.GetServer() ? num.GetServer() : ServerInstance->FakeClient->server)->GetPublicName())
+ : ClientProtocol::Message(nullptr, (num.GetServer() ? num.GetServer() : ServerInstance->FakeClient->server)->GetPublicName())
{
PushParamRef(target);
InitFromNumeric(num);
@@ -93,7 +93,7 @@ public:
* @param num Numeric number.
*/
Numeric(unsigned int num)
- : ClientProtocol::Message(NULL, ServerInstance->Config->GetServerName())
+ : ClientProtocol::Message(nullptr, ServerInstance->Config->GetServerName())
{
InitCommand(num);
PushParam("*");
@@ -113,7 +113,7 @@ public:
*/
Join()
: ClientProtocol::Message("JOIN")
- , memb(NULL)
+ , memb(nullptr)
{
}
@@ -342,8 +342,8 @@ public:
*/
Mode()
: ClientProtocol::Message("MODE", ServerInstance->FakeClient)
- , chantarget(NULL)
- , usertarget(NULL)
+ , chantarget(nullptr)
+ , usertarget(nullptr)
{
}
diff --git a/include/command_parse.h b/include/command_parse.h
index 5e6806a85..a73573a11 100644
--- a/include/command_parse.h
+++ b/include/command_parse.h
@@ -59,7 +59,7 @@ public:
* command simply did not exist at all or the wrong number of parameters were given, or the user
* was not privileged enough to execute the command.
*/
- CmdResult CallHandler(const std::string& commandname, const CommandBase::Params& parameters, User* user, Command** cmd = NULL);
+ CmdResult CallHandler(const std::string& commandname, const CommandBase::Params& parameters, User* user, Command** cmd = nullptr);
/** Get the handler function for a command.
* @param commandname The command required. Always use uppercase for this parameter.
@@ -136,7 +136,7 @@ public:
* @param custom_translator Used to translate the parameter if the translation type is TR_CUSTOM, if NULL, TR_CUSTOM will act like TR_TEXT
* @param paramnumber The index of the parameter we are translating.
*/
- static void TranslateSingleParam(TranslateType to, const std::string& item, std::string& dest, CommandBase* custom_translator = NULL, unsigned int paramnumber = 0);
+ static void TranslateSingleParam(TranslateType to, const std::string& item, std::string& dest, CommandBase* custom_translator = nullptr, unsigned int paramnumber = 0);
/** Translate nicknames in a list of strings into UIDs, based on the TranslateTypes given.
* @param to The translation types to use for the process. If this list is too short, TR_TEXT is assumed for the rest.
@@ -145,5 +145,5 @@ public:
* @param custom_translator Used to translate the parameter if the translation type is TR_CUSTOM, if NULL, TR_CUSTOM will act like TR_TEXT
* @return dest The output string
*/
- static std::string TranslateUIDs(const std::vector<TranslateType>& to, const CommandBase::Params& source, bool prefix_final = false, CommandBase* custom_translator = NULL);
+ static std::string TranslateUIDs(const std::vector<TranslateType>& to, const CommandBase::Params& source, bool prefix_final = false, CommandBase* custom_translator = nullptr);
};
diff --git a/include/configreader.h b/include/configreader.h
index 8660644e7..998249292 100644
--- a/include/configreader.h
+++ b/include/configreader.h
@@ -593,7 +593,7 @@ public:
* @param user The user who initiated the config load or NULL if not initiated by a user.
* @param isinitial Whether this is the initial config load.
*/
- ConfigStatus(User* user = NULL, bool isinitial = false)
+ ConfigStatus(User* user = nullptr, bool isinitial = false)
: initial(isinitial)
, srcuser(user)
{
diff --git a/include/dynref.h b/include/dynref.h
index 512be86fd..f5a980611 100644
--- a/include/dynref.h
+++ b/include/dynref.h
@@ -55,7 +55,7 @@ public:
void SetCaptureHook(CaptureHook* h) { hook = h; }
void check();
- operator bool() const { return (value != NULL); }
+ operator bool() const { return (value != nullptr); }
static void reset_all();
};
diff --git a/include/inspircd.h b/include/inspircd.h
index 7cdad2e31..7883d9db6 100644
--- a/include/inspircd.h
+++ b/include/inspircd.h
@@ -399,8 +399,8 @@ public:
* @param mask The glob pattern to match against.
* @param map The character map to use when matching.
*/
- static bool Match(const std::string& str, const std::string& mask, const unsigned char* map = NULL);
- static bool Match(const char* str, const char* mask, const unsigned char* map = NULL);
+ static bool Match(const std::string& str, const std::string& mask, const unsigned char* map = nullptr);
+ static bool Match(const char* str, const char* mask, const unsigned char* map = nullptr);
/** Match two strings using pattern matching, optionally, with a map
* to check case against (may be NULL). If map is null, match will be case insensitive.
@@ -409,8 +409,8 @@ public:
* @param mask The glob or CIDR pattern to match against.
* @param map The character map to use when matching.
*/
- static bool MatchCIDR(const std::string& str, const std::string& mask, const unsigned char* map = NULL);
- static bool MatchCIDR(const char* str, const char* mask, const unsigned char* map = NULL);
+ static bool MatchCIDR(const std::string& str, const std::string& mask, const unsigned char* map = nullptr);
+ static bool MatchCIDR(const char* str, const char* mask, const unsigned char* map = nullptr);
/** Matches a hostname and IP against a space delimited list of hostmasks.
* @param masks The space delimited masks to match against.
@@ -504,7 +504,7 @@ public:
* @param utc True to convert the time to string as-is, false to convert it to local time first.
* @return A string representing the given date/time.
*/
- static std::string TimeString(time_t curtime, const char* format = NULL, bool utc = false);
+ static std::string TimeString(time_t curtime, const char* format = nullptr, bool utc = false);
/** Compare two strings in a timing-safe way. If the lengths of the strings differ, the function
* returns false immediately (leaking information about the length), otherwise it compares each
diff --git a/include/inspsocket.h b/include/inspsocket.h
index e950b49ff..12fe710f0 100644
--- a/include/inspsocket.h
+++ b/include/inspsocket.h
@@ -437,4 +437,4 @@ protected:
};
inline IOHook* StreamSocket::GetIOHook() const { return iohook; }
-inline void StreamSocket::DelIOHook() { iohook = NULL; }
+inline void StreamSocket::DelIOHook() { iohook = nullptr; }
diff --git a/include/intrusive_list.h b/include/intrusive_list.h
index aeb57abeb..c0d4bd2bc 100644
--- a/include/intrusive_list.h
+++ b/include/intrusive_list.h
@@ -41,7 +41,7 @@ class intrusive_list_node
ptr_next->intrusive_list_node<T, Tag>::ptr_prev = this->ptr_prev;
if (ptr_prev)
ptr_prev->intrusive_list_node<T, Tag>::ptr_next = this->ptr_next;
- ptr_next = ptr_prev = NULL;
+ ptr_next = ptr_prev = nullptr;
}
public:
diff --git a/include/intrusive_list_impl.h b/include/intrusive_list_impl.h
index cdfe1cb81..9b492747b 100644
--- a/include/intrusive_list_impl.h
+++ b/include/intrusive_list_impl.h
@@ -29,7 +29,7 @@ public:
T* curr;
public:
- iterator(T* i = NULL)
+ iterator(T* i = nullptr)
: curr(i)
{
}
diff --git a/include/iohook.h b/include/iohook.h
index 5abd0b043..a5f6f5819 100644
--- a/include/iohook.h
+++ b/include/iohook.h
@@ -168,7 +168,7 @@ public:
{
if (hook->prov->IsMiddle())
return static_cast<IOHookMiddle*>(hook);
- return NULL;
+ return nullptr;
}
friend class StreamSocket;
diff --git a/include/listmode.h b/include/listmode.h
index de52a974b..07e66a37e 100644
--- a/include/listmode.h
+++ b/include/listmode.h
@@ -190,7 +190,7 @@ inline ListModeBase::ModeList* ListModeBase::GetList(Channel* channel)
{
ChanData* cd = extItem.Get(channel);
if (!cd)
- return NULL;
+ return nullptr;
return &cd->list;
}
diff --git a/include/mode.h b/include/mode.h
index 1603892cf..d7d4dd2e9 100644
--- a/include/mode.h
+++ b/include/mode.h
@@ -820,30 +820,30 @@ public:
inline PrefixMode* ModeHandler::IsPrefixMode()
{
- return (this->type_id == MC_PREFIX ? static_cast<PrefixMode*>(this) : NULL);
+ return (this->type_id == MC_PREFIX ? static_cast<PrefixMode*>(this) : nullptr);
}
inline const PrefixMode* ModeHandler::IsPrefixMode() const
{
- return (this->type_id == MC_PREFIX ? static_cast<const PrefixMode*>(this) : NULL);
+ return (this->type_id == MC_PREFIX ? static_cast<const PrefixMode*>(this) : nullptr);
}
inline ListModeBase* ModeHandler::IsListModeBase()
{
- return (this->type_id == MC_LIST ? reinterpret_cast<ListModeBase*>(this) : NULL);
+ return (this->type_id == MC_LIST ? reinterpret_cast<ListModeBase*>(this) : nullptr);
}
inline const ListModeBase* ModeHandler::IsListModeBase() const
{
- return (this->type_id == MC_LIST ? reinterpret_cast<const ListModeBase*>(this) : NULL);
+ return (this->type_id == MC_LIST ? reinterpret_cast<const ListModeBase*>(this) : nullptr);
}
inline ParamModeBase* ModeHandler::IsParameterMode()
{
- return (this->type_id == MC_PARAM ? reinterpret_cast<ParamModeBase*>(this) : NULL);
+ return (this->type_id == MC_PARAM ? reinterpret_cast<ParamModeBase*>(this) : nullptr);
}
inline const ParamModeBase* ModeHandler::IsParameterMode() const
{
- return (this->type_id == MC_PARAM ? reinterpret_cast<const ParamModeBase*>(this) : NULL);
+ return (this->type_id == MC_PARAM ? reinterpret_cast<const ParamModeBase*>(this) : nullptr);
}
diff --git a/include/modules.h b/include/modules.h
index dba5add5a..a2eecf74d 100644
--- a/include/modules.h
+++ b/include/modules.h
@@ -1098,7 +1098,7 @@ public:
* then this contains a the module that your module must be placed before
* or after.
*/
- bool SetPriority(Module* mod, Implementation i, Priority s, Module* which = NULL);
+ bool SetPriority(Module* mod, Implementation i, Priority s, Module* which = nullptr);
/** Change the priority of all events in a module.
* @param mod The module to set the priority of
diff --git a/include/modules/cap.h b/include/modules/cap.h
index 77145acd6..77434642a 100644
--- a/include/modules/cap.h
+++ b/include/modules/cap.h
@@ -143,7 +143,7 @@ namespace Cap
void Unregister()
{
bit = 0;
- extitem = NULL;
+ extitem = nullptr;
}
Ext AddToMask(Ext mask) const { return (mask | GetMask()); }
@@ -243,7 +243,7 @@ namespace Cap
* The cap must be active and the manager must be available for a cap to be registered.
* @return True if the cap is registered in the manager, false otherwise
*/
- bool IsRegistered() const { return (extitem != NULL); }
+ bool IsRegistered() const { return (extitem != nullptr); }
/** Get the CAP negotiation protocol version of a user.
* The cap must be registered for this to return anything other than CAP_LEGACY.
@@ -281,7 +281,7 @@ namespace Cap
*/
virtual const std::string* GetValue(LocalUser* user) const
{
- return NULL;
+ return nullptr;
}
};
@@ -304,7 +304,7 @@ namespace Cap
/** Retrieves the underlying cap. */
operator const Cap::Capability*() const
{
- return ref ? *ref : NULL;
+ return ref ? *ref : nullptr;
}
/** Check whether a user has the referenced capability turned on.
diff --git a/include/modules/dns.h b/include/modules/dns.h
index 0c41a67ff..c8669fff0 100644
--- a/include/modules/dns.h
+++ b/include/modules/dns.h
@@ -161,7 +161,7 @@ namespace DNS
return &rr;
}
- return NULL;
+ return nullptr;
}
};
diff --git a/include/modules/invite.h b/include/modules/invite.h
index 466da4153..e5ff55a86 100644
--- a/include/modules/invite.h
+++ b/include/modules/invite.h
@@ -83,7 +83,7 @@ public:
* @param chan Channel to check
* @return True if the user is invited to the channel, false otherwise
*/
- bool IsInvited(LocalUser* user, Channel* chan) { return (Find(user, chan) != NULL); }
+ bool IsInvited(LocalUser* user, Channel* chan) { return (Find(user, chan) != nullptr); }
/** Removes an Invite if it exists
* @param user User whose invite to remove
@@ -122,7 +122,7 @@ public:
/** Check whether the invite will expire or not
* @return True if the invite is timed, false if it doesn't expire
*/
- bool IsTimed() const { return (expiretimer != NULL); }
+ bool IsTimed() const { return (expiretimer != nullptr); }
/** Serialize this object
* @param human Whether to serialize for human consumption or not.
diff --git a/include/modules/ircv3_batch.h b/include/modules/ircv3_batch.h
index 3640a4dea..804127bb9 100644
--- a/include/modules/ircv3_batch.h
+++ b/include/modules/ircv3_batch.h
@@ -147,7 +147,7 @@ public:
* Batches can be started with Manager::Start() and stopped with Manager::End().
* @return True if the batch is running, false otherwise.
*/
- bool IsRunning() const { return (manager != NULL); }
+ bool IsRunning() const { return (manager != nullptr); }
/** Get the batch start client protocol message.
* The returned message object can be manipulated to add extra parameters or labels to the message. The first
diff --git a/include/modules/ssl.h b/include/modules/ssl.h
index 3e7ba18cc..b77294a58 100644
--- a/include/modules/ssl.h
+++ b/include/modules/ssl.h
@@ -206,7 +206,7 @@ public:
if (lasthook && (lasthook->prov->type == IOHookProvider::IOH_SSL))
return static_cast<SSLIOHook*>(lasthook);
- return NULL;
+ return nullptr;
}
SSLIOHook(std::shared_ptr<IOHookProvider> hookprov)
@@ -267,7 +267,7 @@ public:
{
SSLIOHook* ssliohook = SSLIOHook::IsSSL(sock);
if (!ssliohook)
- return NULL;
+ return nullptr;
return ssliohook->GetCertificate();
}
diff --git a/include/protocol.h b/include/protocol.h
index cf6099a07..a1b597992 100644
--- a/include/protocol.h
+++ b/include/protocol.h
@@ -66,7 +66,7 @@ public:
* and the message was sent, false if it was not found.
* ENCAP (should) be used instead of creating new protocol messages for easier third party application support.
*/
- virtual bool SendEncapsulatedData(const std::string& targetmask, const std::string& cmd, const CommandBase::Params& params, User* source = NULL) { return false; }
+ virtual bool SendEncapsulatedData(const std::string& targetmask, const std::string& cmd, const CommandBase::Params& params, User* source = nullptr) { return false; }
/** Send an ENCAP message to all servers.
* See the protocol documentation for the purpose of ENCAP.
@@ -76,7 +76,7 @@ public:
* or NULL which is equivalent to the local server
* @param omit If non-NULL the message won't be sent in the direction of this server, useful for forwarding messages
*/
- virtual void BroadcastEncap(const std::string& cmd, const CommandBase::Params& params, User* source = NULL, User* omit = NULL) { }
+ virtual void BroadcastEncap(const std::string& cmd, const CommandBase::Params& params, User* source = nullptr, User* omit = nullptr) { }
/** Send metadata for an extensible to other linked servers.
* @param ext The extensible to send metadata for
diff --git a/include/socket.h b/include/socket.h
index 33742c6f4..ba8ef828a 100644
--- a/include/socket.h
+++ b/include/socket.h
@@ -169,7 +169,7 @@ public:
{
public:
IOHookProvRef()
- : dynamic_reference_nocheck<IOHookProvider>(NULL, std::string())
+ : dynamic_reference_nocheck<IOHookProvider>(nullptr, std::string())
{
}
};
diff --git a/include/stdalgo.h b/include/stdalgo.h
index f9fe03a62..e22c03326 100644
--- a/include/stdalgo.h
+++ b/include/stdalgo.h
@@ -177,7 +177,7 @@ namespace stdalgo
void delete_zero(T*& pr)
{
T* p = pr;
- pr = NULL;
+ pr = nullptr;
delete p;
}
diff --git a/include/typedefs.h b/include/typedefs.h
index 5676bfe90..8cac70d5d 100644
--- a/include/typedefs.h
+++ b/include/typedefs.h
@@ -70,7 +70,7 @@ namespace ClientProtocol
std::string value;
void* provdata;
- MessageTagData(MessageTagProvider* prov, const std::string& val, void* data = NULL);
+ MessageTagData(MessageTagProvider* prov, const std::string& val, void* data = nullptr);
};
/** Map of message tag values and providers keyed by their name.
diff --git a/include/usermanager.h b/include/usermanager.h
index bdfdbe40e..be3dca18e 100644
--- a/include/usermanager.h
+++ b/include/usermanager.h
@@ -123,7 +123,7 @@ public:
* @param quitreason The quit reason to show to normal users
* @param operreason The quit reason to show to opers, can be NULL if same as quitreason
*/
- void QuitUser(User* user, const std::string& quitreason, const std::string* operreason = NULL);
+ void QuitUser(User* user, const std::string& quitreason, const std::string* operreason = nullptr);
/** Add a user to the clone map
* @param user The user to add