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
+19 -19
View File
@@ -18,14 +18,14 @@
namespace SoD {
static const char *name = "SoD";
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;
@@ -749,7 +749,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;
@@ -795,7 +795,7 @@ ENCODE(OP_Track)
ENCODE(OP_PetBuffWindow)
{
EQApplicationPacket *in = *p;
*p = NULL;
*p = nullptr;
unsigned char *__emu_buffer = in->pBuffer;
@@ -832,7 +832,7 @@ ENCODE(OP_PetBuffWindow)
ENCODE(OP_Barter)
{
EQApplicationPacket *in = *p;
*p = NULL;
*p = nullptr;
char *Buffer = (char *)in->pBuffer;
@@ -889,7 +889,7 @@ DECODE(OP_InspectRequest) {
ENCODE(OP_BazaarSearch)
{
EQApplicationPacket *in = *p;
*p = NULL;
*p = nullptr;
char *Buffer = (char *)in->pBuffer;
@@ -945,7 +945,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;
@@ -1261,7 +1261,7 @@ ENCODE(OP_ZoneSpawns) {
ENCODE(OP_MercenaryDataResponse) {
//consume the packet
EQApplicationPacket *in = *p;
*p = NULL;
*p = nullptr;
//store away the emu struct
unsigned char *__emu_buffer = in->pBuffer;
@@ -1328,7 +1328,7 @@ ENCODE(OP_MercenaryDataResponse) {
ENCODE(OP_MercenaryDataUpdate) {
//consume the packet
EQApplicationPacket *in = *p;
*p = NULL;
*p = nullptr;
//store away the emu struct
unsigned char *__emu_buffer = in->pBuffer;
@@ -1399,7 +1399,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;
@@ -1428,7 +1428,7 @@ ENCODE(OP_CharInventory) {
//consume the packet
EQApplicationPacket *in = *p;
*p = NULL;
*p = nullptr;
if(in->size == 0) {
@@ -1506,7 +1506,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;
@@ -1875,7 +1875,7 @@ ENCODE(OP_Trader) {
if((*p)->size != sizeof(TraderBuy_Struct)) {
EQApplicationPacket *in = *p;
*p = NULL;
*p = nullptr;
dest->FastQueuePacket(&in, ack_req);
return;
}
@@ -2033,7 +2033,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;
@@ -2097,7 +2097,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;
@@ -2128,7 +2128,7 @@ ENCODE(OP_VetRewardsAvaliable)
ENCODE(OP_WhoAllResponse)
{
EQApplicationPacket *in = *p;
*p = NULL;
*p = nullptr;
char *InBuffer = (char *)in->pBuffer;
@@ -3453,7 +3453,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);