Use “using” instead of typedef
This commit is contained in:
@@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
class Poller;
|
class Poller;
|
||||||
|
|
||||||
typedef int socket_t;
|
using socket_t = int;
|
||||||
|
|
||||||
class SocketHandler
|
class SocketHandler
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ namespace Xmpp
|
|||||||
// Contains:
|
// Contains:
|
||||||
// - an XMPP-valid UTF-8 body
|
// - an XMPP-valid UTF-8 body
|
||||||
// - an XML node representing the XHTML-IM body, or null
|
// - an XML node representing the XHTML-IM body, or null
|
||||||
typedef std::tuple<const std::string, std::unique_ptr<XmlNode>> body;
|
using body = std::tuple<const std::string, std::unique_ptr<XmlNode>>;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* XMPP_BODY_HPP_INCLUDED */
|
#endif /* XMPP_BODY_HPP_INCLUDED */
|
||||||
|
|||||||
@@ -27,10 +27,10 @@ using namespace std::chrono_literals;
|
|||||||
* Define a map of functions to be called for each IRC command we can
|
* Define a map of functions to be called for each IRC command we can
|
||||||
* handle.
|
* handle.
|
||||||
*/
|
*/
|
||||||
typedef void (IrcClient::*irc_callback_t)(const IrcMessage&);
|
using IrcCallback = void (IrcClient::*)(const IrcMessage&);
|
||||||
|
|
||||||
static const std::unordered_map<std::string,
|
static const std::unordered_map<std::string,
|
||||||
std::pair<irc_callback_t, std::pair<std::size_t, std::size_t>>> irc_callbacks = {
|
std::pair<IrcCallback, std::pair<std::size_t, std::size_t>>> irc_callbacks = {
|
||||||
{"NOTICE", {&IrcClient::on_notice, {2, 0}}},
|
{"NOTICE", {&IrcClient::on_notice, {2, 0}}},
|
||||||
{"002", {&IrcClient::forward_server_message, {2, 0}}},
|
{"002", {&IrcClient::forward_server_message, {2, 0}}},
|
||||||
{"003", {&IrcClient::forward_server_message, {2, 0}}},
|
{"003", {&IrcClient::forward_server_message, {2, 0}}},
|
||||||
|
|||||||
Reference in New Issue
Block a user