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

@@ -255,8 +255,8 @@ void WorldSession::HandleAcceptTradeOpcode(WorldPacket& /*recvPacket*/)
if (!his_trade)
return;
Item* myItems[TRADE_SLOT_TRADED_COUNT] = { NULL, NULL, NULL, NULL, NULL, NULL };
Item* hisItems[TRADE_SLOT_TRADED_COUNT] = { NULL, NULL, NULL, NULL, NULL, NULL };
Item* myItems[TRADE_SLOT_TRADED_COUNT] = { nullptr, nullptr, nullptr, nullptr, nullptr, nullptr };
Item* hisItems[TRADE_SLOT_TRADED_COUNT] = { nullptr, nullptr, nullptr, nullptr, nullptr, nullptr };
bool myCanCompleteTrade = true, hisCanCompleteTrade = true;
// set before checks for propertly undo at problems (it already set in to client)
@@ -280,14 +280,14 @@ void WorldSession::HandleAcceptTradeOpcode(WorldPacket& /*recvPacket*/)
if (_player->GetMoney() >= uint32(MAX_MONEY_AMOUNT) - his_trade->GetMoney())
{
_player->SendEquipError(EQUIP_ERR_TOO_MUCH_GOLD, NULL, NULL);
_player->SendEquipError(EQUIP_ERR_TOO_MUCH_GOLD, NULL, nullptr);
my_trade->SetAccepted(false, true);
return;
}
if (trader->GetMoney() >= uint32(MAX_MONEY_AMOUNT) - my_trade->GetMoney())
{
trader->SendEquipError(EQUIP_ERR_TOO_MUCH_GOLD, NULL, NULL);
trader->SendEquipError(EQUIP_ERR_TOO_MUCH_GOLD, NULL, nullptr);
his_trade->SetAccepted(false, true);
return;
}
@@ -331,10 +331,10 @@ void WorldSession::HandleAcceptTradeOpcode(WorldPacket& /*recvPacket*/)
{
setAcceptTradeMode(my_trade, his_trade, myItems, hisItems);
Spell* my_spell = NULL;
Spell* my_spell = nullptr;
SpellCastTargets my_targets;
Spell* his_spell = NULL;
Spell* his_spell = nullptr;
SpellCastTargets his_targets;
// not accept if spell can't be casted now (cheating)
@@ -486,9 +486,9 @@ void WorldSession::HandleAcceptTradeOpcode(WorldPacket& /*recvPacket*/)
// cleanup
clearAcceptTradeMode(my_trade, his_trade);
delete _player->m_trade;
_player->m_trade = NULL;
_player->m_trade = nullptr;
delete trader->m_trade;
trader->m_trade = NULL;
trader->m_trade = nullptr;
// desynchronized with the other saves here (SaveInventoryAndGoldToDB() not have own transaction guards)
SQLTransaction trans = CharacterDatabase.BeginTransaction();
@@ -718,5 +718,5 @@ void WorldSession::HandleClearTradeItemOpcode(WorldPacket& recvPacket)
if (tradeSlot >= TRADE_SLOT_COUNT)
return;
my_trade->SetItem(TradeSlots(tradeSlot), NULL);
my_trade->SetItem(TradeSlots(tradeSlot), nullptr);
}