refactor(Core): NULL -> nullptr (#3275)

* NULL to nullptr

* NULL to nullptr

* NULL to nullptr

* NULL to nullptr

* NULL to nullptr

Co-authored-by: Francesco Borzì <borzifrancesco@gmail.com>
Co-authored-by: Stefano Borzì <stefanoborzi32@gmail.com>
This commit is contained in:
Kitzunu
2020-08-31 11:55:09 +02:00
committed by GitHub
parent 38903b5dfb
commit 1f89282b22
325 changed files with 2348 additions and 2348 deletions

View File

@@ -83,7 +83,7 @@ bool Bag::Create(uint32 guidlow, uint32 itemid, Player const* owner)
for (uint8 i = 0; i < MAX_BAG_SIZE; ++i)
{
SetUInt64Value(CONTAINER_FIELD_SLOT_1 + (i*2), 0);
m_bagslot[i] = NULL;
m_bagslot[i] = nullptr;
}
return true;
@@ -106,7 +106,7 @@ bool Bag::LoadFromDB(uint32 guid, uint64 owner_guid, Field* fields, uint32 entry
{
SetUInt64Value(CONTAINER_FIELD_SLOT_1 + (i*2), 0);
delete m_bagslot[i];
m_bagslot[i] = NULL;
m_bagslot[i] = nullptr;
}
return true;
@@ -136,9 +136,9 @@ void Bag::RemoveItem(uint8 slot, bool /*update*/)
ASSERT(slot < MAX_BAG_SIZE);
if (m_bagslot[slot])
m_bagslot[slot]->SetContainer(NULL);
m_bagslot[slot]->SetContainer(nullptr);
m_bagslot[slot] = NULL;
m_bagslot[slot] = nullptr;
SetUInt64Value(CONTAINER_FIELD_SLOT_1 + (slot * 2), 0);
}
@@ -228,6 +228,6 @@ Item* Bag::GetItemByPos(uint8 slot) const
if (slot < GetBagSize())
return m_bagslot[slot];
return NULL;
return nullptr;
}

View File

@@ -30,8 +30,8 @@ class Bag : public Item
void RemoveItem(uint8 slot, bool update);
Item* GetItemByPos(uint8 slot) const;
uint32 GetItemCount(uint32 item, Item* eItem = NULL) const;
uint32 GetItemCountWithLimitCategory(uint32 limitCategory, Item* skipItem = NULL) const;
uint32 GetItemCount(uint32 item, Item* eItem = nullptr) const;
uint32 GetItemCountWithLimitCategory(uint32 limitCategory, Item* skipItem = nullptr) const;
uint8 GetSlotByItemGUID(uint64 guid) const;
bool IsEmpty() const;