diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-09-01 21:24:59 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-09-01 21:54:48 +0300 |
commit | f5e3f241af190e487c0499dae0efc12e9ae2d202 (patch) | |
tree | 295bac3fa27cfff3c78d664b49b01ff51b723b77 /src/net/eathena | |
parent | 13c5cc47aca547c1f3ca02e26672557823b844ee (diff) | |
download | plus-f5e3f241af190e487c0499dae0efc12e9ae2d202.tar.gz plus-f5e3f241af190e487c0499dae0efc12e9ae2d202.tar.bz2 plus-f5e3f241af190e487c0499dae0efc12e9ae2d202.tar.xz plus-f5e3f241af190e487c0499dae0efc12e9ae2d202.zip |
Fix code style.
Diffstat (limited to 'src/net/eathena')
-rw-r--r-- | src/net/eathena/mail2handler.cpp | 2 | ||||
-rw-r--r-- | src/net/eathena/mail2recv.cpp | 9 | ||||
-rw-r--r-- | src/net/eathena/mail2recv.h | 5 | ||||
-rw-r--r-- | src/net/eathena/mailrecv.cpp | 6 |
4 files changed, 13 insertions, 9 deletions
diff --git a/src/net/eathena/mail2handler.cpp b/src/net/eathena/mail2handler.cpp index c32fde9cf..2b4de04ab 100644 --- a/src/net/eathena/mail2handler.cpp +++ b/src/net/eathena/mail2handler.cpp @@ -30,6 +30,8 @@ #include "utils/checkutils.h" +#include "resources/mailqueue.h" + #include "resources/item/item.h" #include "debug.h" diff --git a/src/net/eathena/mail2recv.cpp b/src/net/eathena/mail2recv.cpp index fdaf34f1d..d3537a48a 100644 --- a/src/net/eathena/mail2recv.cpp +++ b/src/net/eathena/mail2recv.cpp @@ -35,9 +35,10 @@ #include "gui/windows/mailviewwindow.h" #include "gui/windows/mailwindow.h" +#include "net/mail2handler.h" #include "net/messagein.h" -#include "net/eathena/mail2handler.h" +#include "resources/mailqueue.h" #include "resources/inventory/inventory.h" @@ -175,7 +176,7 @@ void Mail2Recv::processRemoveItemResult(Net::MessageIn &msg) if (result == 0) { - Inventory *const inv = PlayerInfo::getInventory(); + const Inventory *const inv = PlayerInfo::getInventory(); if (inv == nullptr) { reportAlways("Player inventory not exists"); @@ -460,7 +461,7 @@ void Mail2Recv::processRequestMoney(Net::MessageIn &msg) case 0: NotifyManager::notify( NotifyTypes::MAIL_GET_MONEY_OK); - if (mailViewWindow) + if (mailViewWindow != nullptr) mailViewWindow->removeMoney(mailId); break; case 1: @@ -489,7 +490,7 @@ void Mail2Recv::processRequestItems(Net::MessageIn &msg) case 0: NotifyManager::notify( NotifyTypes::MAIL_GET_ATTACH_OK); - if (mailViewWindow) + if (mailViewWindow != nullptr) mailViewWindow->removeItems(mailId); break; case 1: diff --git a/src/net/eathena/mail2recv.h b/src/net/eathena/mail2recv.h index dc575b0c8..e23603b8c 100644 --- a/src/net/eathena/mail2recv.h +++ b/src/net/eathena/mail2recv.h @@ -21,10 +21,11 @@ #ifndef NET_EATHENA_MAIL2RECV_H #define NET_EATHENA_MAIL2RECV_H -#include "resources/mailqueue.h" - +#include <string> #include <queue> +struct MailQueue; + namespace Net { class MessageIn; diff --git a/src/net/eathena/mailrecv.cpp b/src/net/eathena/mailrecv.cpp index b51e418a6..de7945a7d 100644 --- a/src/net/eathena/mailrecv.cpp +++ b/src/net/eathena/mailrecv.cpp @@ -120,21 +120,21 @@ void MailRecv::processReadMail(Net::MessageIn &msg) mail->text = msg.readString(sz, "message"); msg.readUInt8("zero"); mail->strTime = timeToStr(mail->time); - if (!mailWindow) + if (mailWindow == nullptr) { reportAlways("Mail window not created"); delete mail; return; } mailWindow->showMessage(mail, itemId != 0 ? 1 : 0); - if (!mailViewWindow) + if (mailViewWindow == nullptr) { reportAlways("Mail view window not created"); return; } Inventory *const inventory = mailViewWindow->getInventory(); - if (!inventory) + if (inventory == nullptr) { reportAlways("Mail view window missing inventory"); return; |