NULL to nullptr

This commit is contained in:
Arthur Ice
2013-05-04 18:06:58 -07:00
parent e1c2657b11
commit 7560b6b0a7
216 changed files with 4151 additions and 4151 deletions
+17 -17
View File
@@ -18,14 +18,14 @@
namespace SoF {
static const char *name = "SoF";
static OpcodeManager *opcodes = NULL;
static OpcodeManager *opcodes = nullptr;
static Strategy struct_strategy;
char* SerializeItem(const ItemInst *inst, int16 slot_id, uint32 *length, uint8 depth);
void Register(EQStreamIdentifier &into) {
//create our opcode manager if we havent already
if(opcodes == NULL) {
if(opcodes == nullptr) {
//TODO: get this file name from the config file
string opfile = "patch_";
opfile += name;
@@ -69,7 +69,7 @@ void Reload() {
//opcode managers because we need to change the manager pointer, which means
//we need to go to every stream and replace it's manager.
if(opcodes != NULL) {
if(opcodes != nullptr) {
//TODO: get this file name from the config file
string opfile = "patch_";
opfile += name;
@@ -185,7 +185,7 @@ ENCODE(OP_OpenNewTasksWindow) {
structs::AvailableTaskTrailer_Struct* __eq_AvailableTaskTrailer;
EQApplicationPacket *in = *p;
*p = NULL;
*p = nullptr;
unsigned char *__emu_buffer = in->pBuffer;
@@ -748,7 +748,7 @@ ENCODE(OP_NewZone) {
ENCODE(OP_Track)
{
EQApplicationPacket *in = *p;
*p = NULL;
*p = nullptr;
unsigned char *__emu_buffer = in->pBuffer;
Track_Struct *emu = (Track_Struct *) __emu_buffer;
@@ -783,7 +783,7 @@ ENCODE(OP_ZoneEntry){ ENCODE_FORWARD(OP_ZoneSpawns); }
ENCODE(OP_ZoneSpawns) {
//consume the packet
EQApplicationPacket *in = *p;
*p = NULL;
*p = nullptr;
//store away the emu struct
unsigned char *__emu_buffer = in->pBuffer;
@@ -903,7 +903,7 @@ ENCODE(OP_ZoneSpawns) {
uint32 ofs;
uint32 val;
uint8 rnd = rand() & 0x0F;
if (sep == NULL)
if (sep == nullptr)
{
ofs = 0;
if ((emu->lastName[2] < '0') || (emu->lastName[2] > '9'))
@@ -917,7 +917,7 @@ ENCODE(OP_ZoneSpawns) {
}
else
{
sep[0] = NULL;
sep[0] = nullptr;
ofs = atoi(&emu->lastName[2]);
sep[0] = '=';
if ((sep[1] < '0') || (sep[1] > '9'))
@@ -1012,7 +1012,7 @@ ENCODE(OP_ItemLinkResponse) { ENCODE_FORWARD(OP_ItemPacket); }
ENCODE(OP_ItemPacket) {
//consume the packet
EQApplicationPacket *in = *p;
*p = NULL;
*p = nullptr;
unsigned char *__emu_buffer = in->pBuffer;
ItemPacket_Struct *old_item_pkt=(ItemPacket_Struct *)__emu_buffer;
@@ -1041,7 +1041,7 @@ ENCODE(OP_CharInventory) {
//consume the packet
EQApplicationPacket *in = *p;
*p = NULL;
*p = nullptr;
if(in->size == 0) {
@@ -1119,7 +1119,7 @@ ENCODE(OP_CharInventory) {
ENCODE(OP_GuildMemberList) {
//consume the packet
EQApplicationPacket *in = *p;
*p = NULL;
*p = nullptr;
//store away the emu struct
unsigned char *__emu_buffer = in->pBuffer;
@@ -1460,14 +1460,14 @@ ENCODE(OP_BazaarSearch) {
if(((*p)->size == sizeof(BazaarReturnDone_Struct)) || ((*p)->size == sizeof(BazaarWelcome_Struct))) {
EQApplicationPacket *in = *p;
*p = NULL;
*p = nullptr;
dest->FastQueuePacket(&in, ack_req);
return;
}
//consume the packet
EQApplicationPacket *in = *p;
*p = NULL;
*p = nullptr;
//store away the emu struct
unsigned char *__emu_buffer = in->pBuffer;
@@ -1513,7 +1513,7 @@ ENCODE(OP_Trader) {
if((*p)->size != sizeof(TraderBuy_Struct)) {
EQApplicationPacket *in = *p;
*p = NULL;
*p = nullptr;
dest->FastQueuePacket(&in, ack_req);
return;
}
@@ -1671,7 +1671,7 @@ ENCODE(OP_AdventureMerchantSell) {
ENCODE(OP_RaidUpdate)
{
EQApplicationPacket *inapp = *p;
*p = NULL;
*p = nullptr;
unsigned char * __emu_buffer = inapp->pBuffer;
RaidGeneral_Struct *raid_gen = (RaidGeneral_Struct*)__emu_buffer;
@@ -1735,7 +1735,7 @@ ENCODE(OP_VetRewardsAvaliable)
unsigned char * __emu_buffer = inapp->pBuffer;
uint32 count = ((*p)->Size() / sizeof(InternalVeteranReward));
*p = NULL;
*p = nullptr;
EQApplicationPacket *outapp_create = new EQApplicationPacket(OP_VetRewardsAvaliable, (sizeof(structs::VeteranReward)*count));
uchar *old_data = __emu_buffer;
@@ -2772,7 +2772,7 @@ char* SerializeItem(const ItemInst *inst, int16 slot_id_in, uint32 *length, uint
for(int x = 0; x < 10; ++x) {
SubSerializations[x] = NULL;
SubSerializations[x] = nullptr;
const ItemInst* subitem = ((const ItemInst*)inst)->GetItem(x);