summaryrefslogtreecommitdiffstats
path: root/src/Mobs/PathFinder.h
diff options
context:
space:
mode:
authorSafwat Halaby <SafwatHalaby@users.noreply.github.com>2015-12-15 09:50:40 +0100
committerSafwat Halaby <SafwatHalaby@users.noreply.github.com>2015-12-15 09:50:40 +0100
commita632f39546c382d2d6fe3772c85a9f5fe1811ef9 (patch)
tree56094fc34363c2afdfb9eb3cc444f15646945e85 /src/Mobs/PathFinder.h
parentMerge pull request #2638 from Gargaj/master (diff)
parentChanged raw cPath to an unique_ptr, fixes memory leak (diff)
downloadcuberite-a632f39546c382d2d6fe3772c85a9f5fe1811ef9.tar
cuberite-a632f39546c382d2d6fe3772c85a9f5fe1811ef9.tar.gz
cuberite-a632f39546c382d2d6fe3772c85a9f5fe1811ef9.tar.bz2
cuberite-a632f39546c382d2d6fe3772c85a9f5fe1811ef9.tar.lz
cuberite-a632f39546c382d2d6fe3772c85a9f5fe1811ef9.tar.xz
cuberite-a632f39546c382d2d6fe3772c85a9f5fe1811ef9.tar.zst
cuberite-a632f39546c382d2d6fe3772c85a9f5fe1811ef9.zip
Diffstat (limited to 'src/Mobs/PathFinder.h')
-rw-r--r--src/Mobs/PathFinder.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Mobs/PathFinder.h b/src/Mobs/PathFinder.h
index 1570679bf..312bb950c 100644
--- a/src/Mobs/PathFinder.h
+++ b/src/Mobs/PathFinder.h
@@ -52,7 +52,7 @@ private:
double m_Height;
/** The current cPath instance we have. This is discarded and recreated when a path recalculation is needed. */
- cPath m_Path;
+ std::unique_ptr<cPath> m_Path;
/** If 0, will give up reaching the next m_WayPoint and will recalculate path. */
int m_GiveUpCounter;