clang-modernize -use-auto convert for world/ucs.cpp

This commit is contained in:
Michael Cook (mackal)
2015-01-09 03:05:15 -05:00
parent c9a75dcf64
commit ca0a8fd974
+3 -3
View File
@@ -52,7 +52,7 @@ bool UCSConnection::Process()
struct in_addr in; struct in_addr in;
in.s_addr = GetIP(); in.s_addr = GetIP();
_log(UCS__ERROR, "UCS authorization failed."); _log(UCS__ERROR, "UCS authorization failed.");
ServerPacket* pack = new ServerPacket(ServerOP_ZAAuthFailed); auto pack = new ServerPacket(ServerOP_ZAAuthFailed);
SendPacket(pack); SendPacket(pack);
delete pack; delete pack;
Disconnect(); Disconnect();
@@ -64,7 +64,7 @@ bool UCSConnection::Process()
struct in_addr in; struct in_addr in;
in.s_addr = GetIP(); in.s_addr = GetIP();
_log(UCS__ERROR, "UCS authorization failed."); _log(UCS__ERROR, "UCS authorization failed.");
ServerPacket* pack = new ServerPacket(ServerOP_ZAAuthFailed); auto pack = new ServerPacket(ServerOP_ZAAuthFailed);
SendPacket(pack); SendPacket(pack);
delete pack; delete pack;
Disconnect(); Disconnect();
@@ -117,7 +117,7 @@ bool UCSConnection::SendPacket(ServerPacket* pack)
void UCSConnection::SendMessage(const char *From, const char *Message) void UCSConnection::SendMessage(const char *From, const char *Message)
{ {
ServerPacket* pack = new ServerPacket(ServerOP_UCSMessage, strlen(From) + strlen(Message) + 2); auto pack = new ServerPacket(ServerOP_UCSMessage, strlen(From) + strlen(Message) + 2);
char *Buffer = (char *)pack->pBuffer; char *Buffer = (char *)pack->pBuffer;