mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-22 05:06:24 +00:00
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:
@@ -70,7 +70,7 @@ Object::Object() : m_PackGUID(sizeof(uint64)+1)
|
||||
m_objectTypeId = TYPEID_OBJECT;
|
||||
m_objectType = TYPEMASK_OBJECT;
|
||||
|
||||
m_uint32Values = NULL;
|
||||
m_uint32Values = nullptr;
|
||||
m_valuesCount = 0;
|
||||
_fieldNotifyFlags = UF_FLAG_DYNAMIC;
|
||||
|
||||
@@ -84,7 +84,7 @@ WorldObject::~WorldObject()
|
||||
{
|
||||
#ifdef ELUNA
|
||||
delete elunaEvents;
|
||||
elunaEvents = NULL;
|
||||
elunaEvents = nullptr;
|
||||
#endif
|
||||
|
||||
// this may happen because there are many !create/delete
|
||||
@@ -300,8 +300,8 @@ void Object::DestroyForPlayer(Player* target, bool onDeath) const
|
||||
|
||||
void Object::BuildMovementUpdate(ByteBuffer* data, uint16 flags) const
|
||||
{
|
||||
Unit const* unit = NULL;
|
||||
WorldObject const* object = NULL;
|
||||
Unit const* unit = nullptr;
|
||||
WorldObject const* object = nullptr;
|
||||
|
||||
if (isType(TYPEMASK_UNIT))
|
||||
unit = ToUnit();
|
||||
@@ -463,7 +463,7 @@ void Object::BuildValuesUpdate(uint8 updateType, ByteBuffer* data, Player* targe
|
||||
UpdateMask updateMask;
|
||||
updateMask.SetCount(m_valuesCount);
|
||||
|
||||
uint32* flags = NULL;
|
||||
uint32* flags = nullptr;
|
||||
uint32 visibleFlag = GetUpdateFieldData(target, flags);
|
||||
|
||||
for (uint16 index = 0; index < m_valuesCount; ++index)
|
||||
@@ -950,7 +950,7 @@ void MovementInfo::OutDebug()
|
||||
sLog->outString("guid " UI64FMTD, guid);
|
||||
sLog->outString("flags %u", flags);
|
||||
sLog->outString("flags2 %u", flags2);
|
||||
sLog->outString("time %u current time " UI64FMTD "", flags2, uint64(::time(NULL)));
|
||||
sLog->outString("time %u current time " UI64FMTD "", flags2, uint64(::time(nullptr)));
|
||||
sLog->outString("position: `%s`", pos.ToString().c_str());
|
||||
if (flags & MOVEMENTFLAG_ONTRANSPORT)
|
||||
{
|
||||
@@ -976,10 +976,10 @@ void MovementInfo::OutDebug()
|
||||
|
||||
WorldObject::WorldObject(bool isWorldObject) : WorldLocation(),
|
||||
#ifdef ELUNA
|
||||
elunaEvents(NULL),
|
||||
elunaEvents(nullptr),
|
||||
#endif
|
||||
LastUsedScriptID(0), m_name(""), m_isActive(false), m_isVisibilityDistanceOverride(false), m_isWorldObject(isWorldObject), m_zoneScript(NULL),
|
||||
m_transport(NULL), m_currMap(NULL), m_InstanceId(0),
|
||||
LastUsedScriptID(0), m_name(""), m_isActive(false), m_isVisibilityDistanceOverride(false), m_isWorldObject(isWorldObject), m_zoneScript(nullptr),
|
||||
m_transport(nullptr), m_currMap(nullptr), m_InstanceId(0),
|
||||
m_phaseMask(PHASEMASK_NORMAL), m_useCombinedPhases(true), m_notifyflags(0), m_executed_notifies(0)
|
||||
{
|
||||
m_serverSideVisibility.SetValue(SERVERSIDE_VISIBILITY_GHOST, GHOST_VISIBILITY_ALIVE | GHOST_VISIBILITY_GHOST);
|
||||
@@ -1087,7 +1087,7 @@ void WorldObject::GetZoneAndAreaId(uint32& zoneid, uint32& areaid, bool /*forceR
|
||||
InstanceScript* WorldObject::GetInstanceScript()
|
||||
{
|
||||
Map* map = GetMap();
|
||||
return map->IsDungeon() ? map->ToInstanceMap()->GetInstanceScript() : NULL;
|
||||
return map->IsDungeon() ? map->ToInstanceMap()->GetInstanceScript() : nullptr;
|
||||
}
|
||||
|
||||
float WorldObject::GetDistanceZ(const WorldObject* obj) const
|
||||
@@ -2094,10 +2094,10 @@ void WorldObject::ResetMap()
|
||||
|
||||
#ifdef ELUNA
|
||||
delete elunaEvents;
|
||||
elunaEvents = NULL;
|
||||
elunaEvents = nullptr;
|
||||
#endif
|
||||
|
||||
m_currMap = NULL;
|
||||
m_currMap = nullptr;
|
||||
//maybe not for corpse
|
||||
//m_mapId = 0;
|
||||
//m_InstanceId = 0;
|
||||
@@ -2170,7 +2170,7 @@ TempSummon* Map::SummonCreature(uint32 entry, Position const& pos, SummonPropert
|
||||
break;
|
||||
}
|
||||
default:
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2178,7 +2178,7 @@ TempSummon* Map::SummonCreature(uint32 entry, Position const& pos, SummonPropert
|
||||
if (summoner)
|
||||
phase = summoner->GetPhaseMask();
|
||||
|
||||
TempSummon* summon = NULL;
|
||||
TempSummon* summon = nullptr;
|
||||
switch (mask)
|
||||
{
|
||||
case UNIT_MASK_SUMMON:
|
||||
@@ -2197,14 +2197,14 @@ TempSummon* Map::SummonCreature(uint32 entry, Position const& pos, SummonPropert
|
||||
summon = new Minion(properties, summoner ? summoner->GetGUID() : 0, false);
|
||||
break;
|
||||
default:
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
EnsureGridLoaded(Cell(pos.GetPositionX(), pos.GetPositionY()));
|
||||
if (!summon->Create(sObjectMgr->GenerateLowGuid(HIGHGUID_UNIT), this, phase, entry, vehId, pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ(), pos.GetOrientation()))
|
||||
{
|
||||
delete summon;
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
summon->SetUInt32Value(UNIT_CREATED_BY_SPELL, spellId);
|
||||
@@ -2245,14 +2245,14 @@ GameObject* Map::SummonGameObject(uint32 entry, float x, float y, float z, float
|
||||
if (!goinfo)
|
||||
{
|
||||
sLog->outErrorDb("Gameobject template %u not found in database!", entry);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
GameObject* go = sObjectMgr->IsGameObjectStaticTransport(entry) ? new StaticTransport() : new GameObject();
|
||||
if (!go->Create(sObjectMgr->GenerateLowGuid(HIGHGUID_GAMEOBJECT), entry, this, PHASEMASK_NORMAL, x, y, z, ang, G3D::Quat(rotation0, rotation1, rotation2, rotation3), 100, GO_STATE_READY))
|
||||
{
|
||||
delete go;
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
// Xinef: if gameobject is temporary, set custom spellid
|
||||
@@ -2286,26 +2286,26 @@ TempSummon* WorldObject::SummonCreature(uint32 entry, const Position &pos, TempS
|
||||
{
|
||||
if (Map* map = FindMap())
|
||||
{
|
||||
if (TempSummon* summon = map->SummonCreature(entry, pos, properties, duration, isType(TYPEMASK_UNIT) ? (Unit*)this : NULL))
|
||||
if (TempSummon* summon = map->SummonCreature(entry, pos, properties, duration, isType(TYPEMASK_UNIT) ? (Unit*)this : nullptr))
|
||||
{
|
||||
summon->SetTempSummonType(spwtype);
|
||||
return summon;
|
||||
}
|
||||
}
|
||||
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
GameObject* WorldObject::SummonGameObject(uint32 entry, float x, float y, float z, float ang, float rotation0, float rotation1, float rotation2, float rotation3, uint32 respawnTime, bool checkTransport)
|
||||
{
|
||||
if (!IsInWorld())
|
||||
return NULL;
|
||||
return nullptr;
|
||||
|
||||
GameObjectTemplate const* goinfo = sObjectMgr->GetGameObjectTemplate(entry);
|
||||
if (!goinfo)
|
||||
{
|
||||
sLog->outErrorDb("Gameobject template %u not found in database!", entry);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
Map* map = GetMap();
|
||||
@@ -2313,7 +2313,7 @@ GameObject* WorldObject::SummonGameObject(uint32 entry, float x, float y, float
|
||||
if (!go->Create(sObjectMgr->GenerateLowGuid(HIGHGUID_GAMEOBJECT), entry, map, GetPhaseMask(), x, y, z, ang, G3D::Quat(rotation0, rotation1, rotation2, rotation3), 100, GO_STATE_READY))
|
||||
{
|
||||
delete go;
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
go->SetRespawnTime(respawnTime);
|
||||
@@ -2336,7 +2336,7 @@ Creature* WorldObject::SummonTrigger(float x, float y, float z, float ang, uint3
|
||||
TempSummonType summonType = (duration == 0) ? TEMPSUMMON_DEAD_DESPAWN : TEMPSUMMON_TIMED_DESPAWN;
|
||||
Creature* summon = SummonCreature(WORLD_TRIGGER, x, y, z, ang, summonType, duration);
|
||||
if (!summon)
|
||||
return NULL;
|
||||
return nullptr;
|
||||
|
||||
//summon->SetName(GetName());
|
||||
if (setLevel && (GetTypeId() == TYPEID_PLAYER || GetTypeId() == TYPEID_UNIT))
|
||||
@@ -2375,7 +2375,7 @@ void WorldObject::SummonCreatureGroup(uint8 group, std::list<TempSummon*>* list
|
||||
|
||||
Creature* WorldObject::FindNearestCreature(uint32 entry, float range, bool alive) const
|
||||
{
|
||||
Creature* creature = NULL;
|
||||
Creature* creature = nullptr;
|
||||
acore::NearestCreatureEntryWithLiveStateInObjectRangeCheck checker(*this, entry, alive, range);
|
||||
acore::CreatureLastSearcher<acore::NearestCreatureEntryWithLiveStateInObjectRangeCheck> searcher(this, creature, checker);
|
||||
VisitNearbyObject(range, searcher);
|
||||
@@ -2384,7 +2384,7 @@ Creature* WorldObject::FindNearestCreature(uint32 entry, float range, bool alive
|
||||
|
||||
GameObject* WorldObject::FindNearestGameObject(uint32 entry, float range) const
|
||||
{
|
||||
GameObject* go = NULL;
|
||||
GameObject* go = nullptr;
|
||||
acore::NearestGameObjectEntryInObjectRangeCheck checker(*this, entry, range);
|
||||
acore::GameObjectLastSearcher<acore::NearestGameObjectEntryInObjectRangeCheck> searcher(this, go, checker);
|
||||
VisitNearbyGridObject(range, searcher);
|
||||
@@ -2393,7 +2393,7 @@ GameObject* WorldObject::FindNearestGameObject(uint32 entry, float range) const
|
||||
|
||||
GameObject* WorldObject::FindNearestGameObjectOfType(GameobjectTypes type, float range) const
|
||||
{
|
||||
GameObject* go = NULL;
|
||||
GameObject* go = nullptr;
|
||||
acore::NearestGameObjectTypeInObjectRangeCheck checker(*this, type, range);
|
||||
acore::GameObjectLastSearcher<acore::NearestGameObjectTypeInObjectRangeCheck> searcher(this, go, checker);
|
||||
VisitNearbyGridObject(range, searcher);
|
||||
@@ -2402,7 +2402,7 @@ GameObject* WorldObject::FindNearestGameObjectOfType(GameobjectTypes type, float
|
||||
|
||||
Player* WorldObject::SelectNearestPlayer(float distance) const
|
||||
{
|
||||
Player* target = NULL;
|
||||
Player* target = nullptr;
|
||||
|
||||
acore::NearestPlayerInObjectRangeCheck checker(this, distance);
|
||||
acore::PlayerLastSearcher<acore::NearestPlayerInObjectRangeCheck> searcher(this, target, checker);
|
||||
@@ -2965,7 +2965,7 @@ struct WorldObjectChangeAccumulator
|
||||
}
|
||||
void Visit(PlayerMapType &m)
|
||||
{
|
||||
Player* source = NULL;
|
||||
Player* source = nullptr;
|
||||
for (PlayerMapType::iterator iter = m.begin(); iter != m.end(); ++iter)
|
||||
{
|
||||
source = iter->GetSource();
|
||||
@@ -2983,7 +2983,7 @@ struct WorldObjectChangeAccumulator
|
||||
|
||||
void Visit(CreatureMapType &m)
|
||||
{
|
||||
Creature* source = NULL;
|
||||
Creature* source = nullptr;
|
||||
for (CreatureMapType::iterator iter = m.begin(); iter != m.end(); ++iter)
|
||||
{
|
||||
source = iter->GetSource();
|
||||
@@ -2998,7 +2998,7 @@ struct WorldObjectChangeAccumulator
|
||||
|
||||
void Visit(DynamicObjectMapType &m)
|
||||
{
|
||||
DynamicObject* source = NULL;
|
||||
DynamicObject* source = nullptr;
|
||||
for (DynamicObjectMapType::iterator iter = m.begin(); iter != m.end(); ++iter)
|
||||
{
|
||||
source = iter->GetSource();
|
||||
|
||||
@@ -307,21 +307,21 @@ class Object
|
||||
// FG: some hacky helpers
|
||||
void ForceValuesUpdateAtIndex(uint32);
|
||||
|
||||
Player* ToPlayer() { if (GetTypeId() == TYPEID_PLAYER) return reinterpret_cast<Player*>(this); else return NULL; }
|
||||
Player const* ToPlayer() const { if (GetTypeId() == TYPEID_PLAYER) return (Player const*)((Player*)this); else return NULL; }
|
||||
Creature* ToCreature() { if (GetTypeId() == TYPEID_UNIT) return reinterpret_cast<Creature*>(this); else return NULL; }
|
||||
Creature const* ToCreature() const { if (GetTypeId() == TYPEID_UNIT) return (Creature const*)((Creature*)this); else return NULL; }
|
||||
Player* ToPlayer() { if (GetTypeId() == TYPEID_PLAYER) return reinterpret_cast<Player*>(this); else return nullptr; }
|
||||
Player const* ToPlayer() const { if (GetTypeId() == TYPEID_PLAYER) return (Player const*)((Player*)this); else return nullptr; }
|
||||
Creature* ToCreature() { if (GetTypeId() == TYPEID_UNIT) return reinterpret_cast<Creature*>(this); else return nullptr; }
|
||||
Creature const* ToCreature() const { if (GetTypeId() == TYPEID_UNIT) return (Creature const*)((Creature*)this); else return nullptr; }
|
||||
|
||||
Unit* ToUnit() { if (GetTypeId() == TYPEID_UNIT || GetTypeId() == TYPEID_PLAYER) return reinterpret_cast<Unit*>(this); else return NULL; }
|
||||
Unit const* ToUnit() const { if (GetTypeId() == TYPEID_UNIT || GetTypeId() == TYPEID_PLAYER) return (const Unit*)((Unit*)this); else return NULL; }
|
||||
GameObject* ToGameObject() { if (GetTypeId() == TYPEID_GAMEOBJECT) return reinterpret_cast<GameObject*>(this); else return NULL; }
|
||||
GameObject const* ToGameObject() const { if (GetTypeId() == TYPEID_GAMEOBJECT) return (const GameObject*)((GameObject*)this); else return NULL; }
|
||||
Unit* ToUnit() { if (GetTypeId() == TYPEID_UNIT || GetTypeId() == TYPEID_PLAYER) return reinterpret_cast<Unit*>(this); else return nullptr; }
|
||||
Unit const* ToUnit() const { if (GetTypeId() == TYPEID_UNIT || GetTypeId() == TYPEID_PLAYER) return (const Unit*)((Unit*)this); else return nullptr; }
|
||||
GameObject* ToGameObject() { if (GetTypeId() == TYPEID_GAMEOBJECT) return reinterpret_cast<GameObject*>(this); else return nullptr; }
|
||||
GameObject const* ToGameObject() const { if (GetTypeId() == TYPEID_GAMEOBJECT) return (const GameObject*)((GameObject*)this); else return nullptr; }
|
||||
|
||||
Corpse* ToCorpse() { if (GetTypeId() == TYPEID_CORPSE) return reinterpret_cast<Corpse*>(this); else return NULL; }
|
||||
Corpse const* ToCorpse() const { if (GetTypeId() == TYPEID_CORPSE) return (const Corpse*)((Corpse*)this); else return NULL; }
|
||||
Corpse* ToCorpse() { if (GetTypeId() == TYPEID_CORPSE) return reinterpret_cast<Corpse*>(this); else return nullptr; }
|
||||
Corpse const* ToCorpse() const { if (GetTypeId() == TYPEID_CORPSE) return (const Corpse*)((Corpse*)this); else return nullptr; }
|
||||
|
||||
DynamicObject* ToDynObject() { if (GetTypeId() == TYPEID_DYNAMICOBJECT) return reinterpret_cast<DynamicObject*>(this); else return NULL; }
|
||||
DynamicObject const* ToDynObject() const { if (GetTypeId() == TYPEID_DYNAMICOBJECT) return reinterpret_cast<DynamicObject const*>(this); else return NULL; }
|
||||
DynamicObject* ToDynObject() { if (GetTypeId() == TYPEID_DYNAMICOBJECT) return reinterpret_cast<DynamicObject*>(this); else return nullptr; }
|
||||
DynamicObject const* ToDynObject() const { if (GetTypeId() == TYPEID_DYNAMICOBJECT) return reinterpret_cast<DynamicObject const*>(this); else return nullptr; }
|
||||
|
||||
DataMap CustomData;
|
||||
|
||||
@@ -897,7 +897,7 @@ class WorldObject : public Object, public WorldLocation
|
||||
virtual void CleanupsBeforeDelete(bool finalCleanup = true); // used in destructor or explicitly before mass creature delete to remove cross-references to already deleted units
|
||||
|
||||
virtual void SendMessageToSet(WorldPacket* data, bool self) { if (IsInWorld()) SendMessageToSetInRange(data, GetVisibilityRange(), self, true); } // pussywizard!
|
||||
virtual void SendMessageToSetInRange(WorldPacket* data, float dist, bool /*self*/, bool includeMargin = false, Player const* skipped_rcvr = NULL); // pussywizard!
|
||||
virtual void SendMessageToSetInRange(WorldPacket* data, float dist, bool /*self*/, bool includeMargin = false, Player const* skipped_rcvr = nullptr); // pussywizard!
|
||||
virtual void SendMessageToSet(WorldPacket* data, Player const* skipped_rcvr) { if (IsInWorld()) SendMessageToSetInRange(data, GetVisibilityRange(), false, true, skipped_rcvr); } // pussywizard!
|
||||
|
||||
virtual uint8 getLevelForTarget(WorldObject const* /*target*/) const { return 1; }
|
||||
@@ -911,8 +911,8 @@ class WorldObject : public Object, public WorldLocation
|
||||
void MonsterTextEmote(int32 textId, WorldObject const* target, bool IsBossEmote = false);
|
||||
void MonsterWhisper(int32 textId, Player const* target, bool IsBossWhisper = false);
|
||||
|
||||
void PlayDistanceSound(uint32 sound_id, Player* target = NULL);
|
||||
void PlayDirectSound(uint32 sound_id, Player* target = NULL);
|
||||
void PlayDistanceSound(uint32 sound_id, Player* target = nullptr);
|
||||
void PlayDirectSound(uint32 sound_id, Player* target = nullptr);
|
||||
|
||||
void SendObjectDeSpawnAnim(uint64 guid);
|
||||
|
||||
@@ -921,7 +921,7 @@ class WorldObject : public Object, public WorldLocation
|
||||
|
||||
float GetGridActivationRange() const;
|
||||
float GetVisibilityRange() const;
|
||||
float GetSightRange(const WorldObject* target = NULL) const;
|
||||
float GetSightRange(const WorldObject* target = nullptr) const;
|
||||
//bool CanSeeOrDetect(WorldObject const* obj, bool ignoreStealth = false, bool distanceCheck = false) const;
|
||||
bool CanSeeOrDetect(WorldObject const* obj, bool ignoreStealth = false, bool distanceCheck = false, bool checkAlert = false) const;
|
||||
|
||||
@@ -950,8 +950,8 @@ class WorldObject : public Object, public WorldLocation
|
||||
void SetZoneScript();
|
||||
ZoneScript* GetZoneScript() const { return m_zoneScript; }
|
||||
|
||||
TempSummon* SummonCreature(uint32 id, const Position &pos, TempSummonType spwtype = TEMPSUMMON_MANUAL_DESPAWN, uint32 despwtime = 0, uint32 vehId = 0, SummonPropertiesEntry const *properties = NULL) const;
|
||||
TempSummon* SummonCreature(uint32 id, float x, float y, float z, float ang = 0, TempSummonType spwtype = TEMPSUMMON_MANUAL_DESPAWN, uint32 despwtime = 0, SummonPropertiesEntry const *properties = NULL)
|
||||
TempSummon* SummonCreature(uint32 id, const Position &pos, TempSummonType spwtype = TEMPSUMMON_MANUAL_DESPAWN, uint32 despwtime = 0, uint32 vehId = 0, SummonPropertiesEntry const *properties = nullptr) const;
|
||||
TempSummon* SummonCreature(uint32 id, float x, float y, float z, float ang = 0, TempSummonType spwtype = TEMPSUMMON_MANUAL_DESPAWN, uint32 despwtime = 0, SummonPropertiesEntry const *properties = nullptr)
|
||||
{
|
||||
if (!x && !y && !z)
|
||||
{
|
||||
@@ -963,8 +963,8 @@ class WorldObject : public Object, public WorldLocation
|
||||
return SummonCreature(id, pos, spwtype, despwtime, 0, properties);
|
||||
}
|
||||
GameObject* SummonGameObject(uint32 entry, float x, float y, float z, float ang, float rotation0, float rotation1, float rotation2, float rotation3, uint32 respawnTime, bool checkTransport = true);
|
||||
Creature* SummonTrigger(float x, float y, float z, float ang, uint32 dur, bool setLevel = false, CreatureAI* (*GetAI)(Creature*) = NULL);
|
||||
void SummonCreatureGroup(uint8 group, std::list<TempSummon*>* list = NULL);
|
||||
Creature* SummonTrigger(float x, float y, float z, float ang, uint32 dur, bool setLevel = false, CreatureAI* (*GetAI)(Creature*) = nullptr);
|
||||
void SummonCreatureGroup(uint8 group, std::list<TempSummon*>* list = nullptr);
|
||||
|
||||
Creature* FindNearestCreature(uint32 entry, float range, bool alive = true) const;
|
||||
GameObject* FindNearestGameObject(uint32 entry, float range) const;
|
||||
|
||||
@@ -20,8 +20,8 @@ ObjectPosSelector::ObjectPosSelector(float x, float y, float size, float dist)
|
||||
m_smallStepOk[USED_POS_PLUS] = false;
|
||||
m_smallStepOk[USED_POS_MINUS] = false;
|
||||
|
||||
m_smallStepNextUsedPos[USED_POS_PLUS] = NULL;
|
||||
m_smallStepNextUsedPos[USED_POS_MINUS] = NULL;
|
||||
m_smallStepNextUsedPos[USED_POS_PLUS] = nullptr;
|
||||
m_smallStepNextUsedPos[USED_POS_MINUS] = nullptr;
|
||||
}
|
||||
|
||||
ObjectPosSelector::UsedPosList::value_type const* ObjectPosSelector::nextUsedPos(UsedPosType uptype)
|
||||
@@ -35,7 +35,7 @@ ObjectPosSelector::UsedPosList::value_type const* ObjectPosSelector::nextUsedPos
|
||||
if (!m_UsedPosLists[~uptype].empty())
|
||||
return &*m_UsedPosLists[~uptype].rbegin();
|
||||
else
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
else
|
||||
return &*itr;
|
||||
|
||||
@@ -22,9 +22,9 @@ class UpdateMask
|
||||
CLIENT_UPDATE_MASK_BITS = sizeof(ClientUpdateMaskType) * 8,
|
||||
};
|
||||
|
||||
UpdateMask() : _fieldCount(0), _blockCount(0), _bits(NULL) { }
|
||||
UpdateMask() : _fieldCount(0), _blockCount(0), _bits(nullptr) { }
|
||||
|
||||
UpdateMask(UpdateMask const& right) : _bits(NULL)
|
||||
UpdateMask(UpdateMask const& right) : _bits(nullptr)
|
||||
{
|
||||
SetCount(right.GetCount());
|
||||
memcpy(_bits, right._bits, sizeof(uint8) * _blockCount * 32);
|
||||
|
||||
Reference in New Issue
Block a user