mirror of
https://github.com/SWG-Source/src.git
synced 2026-08-04 04:16:02 -04:00
remove unnecessary null checks
This commit is contained in:
+2
-5
@@ -52,12 +52,9 @@ MessageQueue::Data * AiCreatureStateMessage::unpack(Archive::ReadIterator & sour
|
||||
{
|
||||
AiCreatureStateMessage * msg = new AiCreatureStateMessage();
|
||||
|
||||
if (msg != NULL)
|
||||
if (GameServerMessageInterface::getInstance() != NULL)
|
||||
{
|
||||
if (GameServerMessageInterface::getInstance() != NULL)
|
||||
{
|
||||
GameServerMessageInterface::getInstance()->unpack(source, *msg);
|
||||
}
|
||||
GameServerMessageInterface::getInstance()->unpack(source, *msg);
|
||||
}
|
||||
|
||||
return msg;
|
||||
|
||||
+4
-5
@@ -71,11 +71,10 @@ void AiMovementMessage::pack(const MessageQueue::Data* const data, Archive::Byte
|
||||
MessageQueue::Data* AiMovementMessage::unpack(Archive::ReadIterator & source)
|
||||
{
|
||||
AiMovementMessage * msg = new AiMovementMessage();
|
||||
if (msg)
|
||||
{
|
||||
if (GameServerMessageInterface::getInstance() != NULL)
|
||||
GameServerMessageInterface::getInstance()->unpack(source, *msg);
|
||||
}
|
||||
|
||||
if (GameServerMessageInterface::getInstance() != NULL)
|
||||
GameServerMessageInterface::getInstance()->unpack(source, *msg);
|
||||
|
||||
return msg;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user