summaryrefslogtreecommitdiffstats
path: root/src/Entities/ProjectileEntity.cpp
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2014-10-20 22:55:07 +0200
committerarchshift <admin@archshift.com>2014-10-23 05:12:49 +0200
commita26541a7c3ced0569098edd0aae61c097c2912f4 (patch)
tree4b7bea204c0ddd18bb4f95357f9eb77590bc2e8d /src/Entities/ProjectileEntity.cpp
parentComposableGenerator: Removed nullptr initializers. (diff)
downloadcuberite-a26541a7c3ced0569098edd0aae61c097c2912f4.tar
cuberite-a26541a7c3ced0569098edd0aae61c097c2912f4.tar.gz
cuberite-a26541a7c3ced0569098edd0aae61c097c2912f4.tar.bz2
cuberite-a26541a7c3ced0569098edd0aae61c097c2912f4.tar.lz
cuberite-a26541a7c3ced0569098edd0aae61c097c2912f4.tar.xz
cuberite-a26541a7c3ced0569098edd0aae61c097c2912f4.tar.zst
cuberite-a26541a7c3ced0569098edd0aae61c097c2912f4.zip
Diffstat (limited to '')
-rw-r--r--src/Entities/ProjectileEntity.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/Entities/ProjectileEntity.cpp b/src/Entities/ProjectileEntity.cpp
index ab25ac30c..1768714f8 100644
--- a/src/Entities/ProjectileEntity.cpp
+++ b/src/Entities/ProjectileEntity.cpp
@@ -135,7 +135,7 @@ public:
m_Pos(a_Pos),
m_NextPos(a_NextPos),
m_MinCoeff(1),
- m_HitEntity(NULL)
+ m_HitEntity(nullptr)
{
}
@@ -221,9 +221,9 @@ cProjectileEntity::cProjectileEntity(eKind a_Kind, cEntity * a_Creator, double a
super(etProjectile, a_X, a_Y, a_Z, a_Width, a_Height),
m_ProjectileKind(a_Kind),
m_CreatorData(
- ((a_Creator != NULL) ? a_Creator->GetUniqueID() : -1),
- ((a_Creator != NULL) ? (a_Creator->IsPlayer() ? ((cPlayer *)a_Creator)->GetName() : "") : ""),
- ((a_Creator != NULL) ? a_Creator->GetEquippedWeapon().m_Enchantments : cEnchantments())
+ ((a_Creator != nullptr) ? a_Creator->GetUniqueID() : -1),
+ ((a_Creator != nullptr) ? (a_Creator->IsPlayer() ? ((cPlayer *)a_Creator)->GetName() : "") : ""),
+ ((a_Creator != nullptr) ? a_Creator->GetEquippedWeapon().m_Enchantments : cEnchantments())
),
m_IsInGround(false)
{
@@ -251,7 +251,7 @@ cProjectileEntity::cProjectileEntity(eKind a_Kind, cEntity * a_Creator, const Ve
cProjectileEntity * cProjectileEntity::Create(eKind a_Kind, cEntity * a_Creator, double a_X, double a_Y, double a_Z, const cItem * a_Item, const Vector3d * a_Speed)
{
Vector3d Speed;
- if (a_Speed != NULL)
+ if (a_Speed != nullptr)
{
Speed = *a_Speed;
}
@@ -269,10 +269,10 @@ cProjectileEntity * cProjectileEntity::Create(eKind a_Kind, cEntity * a_Creator,
case pkWitherSkull: return new cWitherSkullEntity (a_Creator, a_X, a_Y, a_Z, Speed);
case pkFirework:
{
- ASSERT(a_Item != NULL);
+ ASSERT(a_Item != nullptr);
if (a_Item->m_FireworkItem.m_Colours.empty())
{
- return NULL;
+ return nullptr;
}
return new cFireworkEntity(a_Creator, a_X, a_Y, a_Z, *a_Item);
@@ -280,7 +280,7 @@ cProjectileEntity * cProjectileEntity::Create(eKind a_Kind, cEntity * a_Creator,
}
LOGWARNING("%s: Unknown projectile kind: %d", __FUNCTION__, a_Kind);
- return NULL;
+ return nullptr;
}