summaryrefslogtreecommitdiffstats
path: root/src/Mobs/Slime.cpp
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2016-12-19 21:12:23 +0100
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2017-08-07 20:24:16 +0200
commit4ef47aed62364f9cf1474864e5cf94232b4477af (patch)
tree28ca15247c2437b91e9aada48c2da4a1a3c00c17 /src/Mobs/Slime.cpp
parentRemoved unneeded includes (#3902) (diff)
downloadcuberite-4ef47aed62364f9cf1474864e5cf94232b4477af.tar
cuberite-4ef47aed62364f9cf1474864e5cf94232b4477af.tar.gz
cuberite-4ef47aed62364f9cf1474864e5cf94232b4477af.tar.bz2
cuberite-4ef47aed62364f9cf1474864e5cf94232b4477af.tar.lz
cuberite-4ef47aed62364f9cf1474864e5cf94232b4477af.tar.xz
cuberite-4ef47aed62364f9cf1474864e5cf94232b4477af.tar.zst
cuberite-4ef47aed62364f9cf1474864e5cf94232b4477af.zip
Diffstat (limited to '')
-rw-r--r--src/Mobs/Slime.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Mobs/Slime.cpp b/src/Mobs/Slime.cpp
index 3f832ae87..291a3a57f 100644
--- a/src/Mobs/Slime.cpp
+++ b/src/Mobs/Slime.cpp
@@ -78,10 +78,10 @@ void cSlime::KilledBy(TakeDamageInfo & a_TDI)
double AddX = (i % 2 - 0.5) * m_Size / 4.0;
double AddZ = (i / 2 - 0.5) * m_Size / 4.0;
- cSlime * NewSlime = new cSlime(m_Size / 2);
+ auto NewSlime = cpp14::make_unique<cSlime>(m_Size / 2);
NewSlime->SetPosition(GetPosX() + AddX, GetPosY() + 0.5, GetPosZ() + AddZ);
NewSlime->SetYaw(Random.RandReal(360.0f));
- m_World->SpawnMobFinalize(NewSlime);
+ m_World->SpawnMobFinalize(std::move(NewSlime));
}
}
super::KilledBy(a_TDI);