mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-11 07:38:36 +00:00
Pass through zone code to fix uninitialized pointer declarations
This commit is contained in:
+10
-10
@@ -717,7 +717,7 @@ bool Client::AddPacket(EQApplicationPacket** pApp, bool bAckreq) {
|
||||
|
||||
c->ack_req = bAckreq;
|
||||
c->app = *pApp;
|
||||
*pApp = 0;
|
||||
*pApp = nullptr;
|
||||
|
||||
clientpackets.Append(c);
|
||||
return true;
|
||||
@@ -726,7 +726,7 @@ bool Client::AddPacket(EQApplicationPacket** pApp, bool bAckreq) {
|
||||
bool Client::SendAllPackets() {
|
||||
LinkedListIterator<CLIENTPACKET*> iterator(clientpackets);
|
||||
|
||||
CLIENTPACKET* cp = 0;
|
||||
CLIENTPACKET* cp = nullptr;
|
||||
iterator.Reset();
|
||||
while(iterator.MoreElements()) {
|
||||
cp = iterator.GetData();
|
||||
@@ -772,7 +772,7 @@ void Client::FastQueuePacket(EQApplicationPacket** app, bool ack_req, CLIENT_CON
|
||||
eqs->FastQueuePacket((EQApplicationPacket **)app, ack_req);
|
||||
else if (app && (*app))
|
||||
delete *app;
|
||||
*app = 0;
|
||||
*app = nullptr;
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -2038,7 +2038,7 @@ void Client::ReadBook(BookRequest_Struct *book) {
|
||||
read_from_slot = book->invslot -1;
|
||||
}
|
||||
|
||||
const EQEmu::ItemInstance *inst = 0;
|
||||
const EQEmu::ItemInstance *inst = nullptr;
|
||||
|
||||
if (read_from_slot <= EQEmu::legacy::SLOT_PERSONAL_BAGS_END)
|
||||
{
|
||||
@@ -4046,7 +4046,7 @@ bool Client::KeyRingCheck(uint32 item_id)
|
||||
void Client::KeyRingList()
|
||||
{
|
||||
Message(4,"Keys on Keyring:");
|
||||
const EQEmu::ItemData *item = 0;
|
||||
const EQEmu::ItemData *item = nullptr;
|
||||
for (auto iter = keyring.begin(); iter != keyring.end(); ++iter) {
|
||||
if ((item = database.GetItem(*iter))!=nullptr) {
|
||||
Message(4,item->Name);
|
||||
@@ -4659,7 +4659,7 @@ void Client::SendRespawnBinds()
|
||||
uint32 PacketLength = 17 + (26 * num_options); //Header size + per-option invariant size
|
||||
|
||||
std::list<RespawnOption>::iterator itr;
|
||||
RespawnOption* opt;
|
||||
RespawnOption* opt = nullptr;
|
||||
|
||||
//Find string size for each option
|
||||
for (itr = respawn_options.begin(); itr != respawn_options.end(); ++itr)
|
||||
@@ -8385,7 +8385,7 @@ bool Client::RemoveRespawnOption(std::string option_name)
|
||||
if (IsHoveringForRespawn() || respawn_options.empty()) { return false; }
|
||||
|
||||
bool had = false;
|
||||
RespawnOption* opt;
|
||||
RespawnOption* opt = nullptr;
|
||||
std::list<RespawnOption>::iterator itr;
|
||||
for (itr = respawn_options.begin(); itr != respawn_options.end(); ++itr)
|
||||
{
|
||||
@@ -8432,7 +8432,7 @@ bool Client::RemoveRespawnOption(uint8 position)
|
||||
|
||||
void Client::SetHunger(int32 in_hunger)
|
||||
{
|
||||
EQApplicationPacket *outapp;
|
||||
EQApplicationPacket *outapp = nullptr;
|
||||
outapp = new EQApplicationPacket(OP_Stamina, sizeof(Stamina_Struct));
|
||||
Stamina_Struct* sta = (Stamina_Struct*)outapp->pBuffer;
|
||||
sta->food = in_hunger;
|
||||
@@ -8446,7 +8446,7 @@ void Client::SetHunger(int32 in_hunger)
|
||||
|
||||
void Client::SetThirst(int32 in_thirst)
|
||||
{
|
||||
EQApplicationPacket *outapp;
|
||||
EQApplicationPacket *outapp = nullptr;
|
||||
outapp = new EQApplicationPacket(OP_Stamina, sizeof(Stamina_Struct));
|
||||
Stamina_Struct* sta = (Stamina_Struct*)outapp->pBuffer;
|
||||
sta->food = m_pp.hunger_level > 6000 ? 6000 : m_pp.hunger_level;
|
||||
@@ -8460,7 +8460,7 @@ void Client::SetThirst(int32 in_thirst)
|
||||
|
||||
void Client::SetConsumption(int32 in_hunger, int32 in_thirst)
|
||||
{
|
||||
EQApplicationPacket *outapp;
|
||||
EQApplicationPacket *outapp = nullptr;
|
||||
outapp = new EQApplicationPacket(OP_Stamina, sizeof(Stamina_Struct));
|
||||
Stamina_Struct* sta = (Stamina_Struct*)outapp->pBuffer;
|
||||
sta->food = in_hunger;
|
||||
|
||||
Reference in New Issue
Block a user