mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-16 01:28:22 +00:00
[Cleanup] use std::make_unique (#1259)
* Convert common/eq_limits.cpp to use make_unique * Convert common/net/console_server.cpp to use make_unique * Convert common/net/servertalk_client_connection.cpp to use make_unique * Convert common/net/servertalk_legacy_client_connection.cpp to use make_unique * Convert common/net/servertalk_server.cpp to use make_unique * Convert common/net/websocket_server.cpp to use make_unique * Convert common/net/websocket_server_connection.cpp to use make_unique * Convert common/shareddb.cpp to use make_unique * Convert eqlaunch/worldserver.cpp to use make_unique * Convert loginserver/server_manager.cpp to use make_unique * Convert loginserver/world_server.cpp to use make_unique * Convert queryserv/worldserver.cpp to use make_unique * Convert ucs/worldserver.cpp to use make_unique * Convert world/clientlist.cpp to use make_unique * Convert world/expedition.cpp to use make_unique * Convert world/launcher_link.cpp to use make_unique * Convert world/login_server.cpp to use make_unique * Convert world/main.cpp to use make_unique * Convert world/ucs.cpp to use make_unique * Convert world/web_interface.cpp to use make_unique * Convert world/zonelist.cpp to use make_unique * Convert world/zoneserver.cpp to use make_unique * Convert zone/client.cpp to use make_unique * Convert zone/corpse.cpp to use make_unique * Convert zone/dynamiczone.cpp to use make_unique * Convert zone/expedition.cpp to use make_unique * Convert zone/main.cpp to use make_unique * Convert zone/mob_ai.cpp to use make_unique * Convert zone/mob_movement_manager.cpp to use make_unique * Convert zone/pathfinder_nav_mesh.cpp to use make_unique * Convert zone/worldserver.cpp to use make_unique
This commit is contained in:
committed by
GitHub
parent
fa9478ac44
commit
7a46a6595c
+10
-10
@@ -342,7 +342,7 @@ bool LoginServer::Connect()
|
||||
}
|
||||
|
||||
if (IsLegacy) {
|
||||
legacy_client.reset(new EQ::Net::ServertalkLegacyClient(LoginServerAddress, LoginServerPort, false));
|
||||
legacy_client = std::make_unique<EQ::Net::ServertalkLegacyClient>(LoginServerAddress, LoginServerPort, false);
|
||||
legacy_client->OnConnect(
|
||||
[this](EQ::Net::ServertalkLegacyClient *client) {
|
||||
if (client) {
|
||||
@@ -356,12 +356,12 @@ bool LoginServer::Connect()
|
||||
SendStatus();
|
||||
zoneserver_list.SendLSZones();
|
||||
|
||||
statusupdate_timer.reset(
|
||||
new EQ::Timer(
|
||||
statusupdate_timer = std::make_unique<EQ::Timer>(
|
||||
|
||||
LoginServer_StatusUpdateInterval, true, [this](EQ::Timer *t) {
|
||||
SendStatus();
|
||||
}
|
||||
)
|
||||
|
||||
);
|
||||
}
|
||||
else {
|
||||
@@ -448,7 +448,7 @@ bool LoginServer::Connect()
|
||||
);
|
||||
}
|
||||
else {
|
||||
client.reset(new EQ::Net::ServertalkClient(LoginServerAddress, LoginServerPort, false, "World", ""));
|
||||
client = std::make_unique<EQ::Net::ServertalkClient>(LoginServerAddress, LoginServerPort, false, "World", "");
|
||||
client->OnConnect(
|
||||
[this](EQ::Net::ServertalkClient *client) {
|
||||
if (client) {
|
||||
@@ -461,12 +461,12 @@ bool LoginServer::Connect()
|
||||
SendStatus();
|
||||
zoneserver_list.SendLSZones();
|
||||
|
||||
statusupdate_timer.reset(
|
||||
new EQ::Timer(
|
||||
statusupdate_timer = std::make_unique<EQ::Timer>(
|
||||
|
||||
LoginServer_StatusUpdateInterval, true, [this](EQ::Timer *t) {
|
||||
SendStatus();
|
||||
}
|
||||
));
|
||||
);
|
||||
}
|
||||
else {
|
||||
LogInfo(
|
||||
@@ -552,7 +552,7 @@ bool LoginServer::Connect()
|
||||
);
|
||||
}
|
||||
|
||||
m_keepalive.reset(new EQ::Timer(5000, true, std::bind(&LoginServer::OnKeepAlive, this, std::placeholders::_1)));
|
||||
m_keepalive = std::make_unique<EQ::Timer>(5000, true, std::bind(&LoginServer::OnKeepAlive, this, std::placeholders::_1));
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -649,4 +649,4 @@ void LoginServer::OnKeepAlive(EQ::Timer *t)
|
||||
{
|
||||
ServerPacket pack(ServerOP_KeepAlive, 0);
|
||||
SendPacket(&pack);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user