summaryrefslogtreecommitdiffstats
path: root/src/Mobs/Path.h
diff options
context:
space:
mode:
authorJulian Laubstein <julianlaubstein@yahoo.de>2015-05-29 11:08:32 +0200
committerJulian Laubstein <julianlaubstein@yahoo.de>2015-05-29 11:08:32 +0200
commit1e6f02437e88495d57249f742526526ee5865777 (patch)
treeaf200ec3c23c5d04359ba471d275cfa6d0a3c7fb /src/Mobs/Path.h
parentMerge pull request #2157 from beeduck/Issue2106 (diff)
parentMerge branch 'master' into PreventNewWarnings (diff)
downloadcuberite-1e6f02437e88495d57249f742526526ee5865777.tar
cuberite-1e6f02437e88495d57249f742526526ee5865777.tar.gz
cuberite-1e6f02437e88495d57249f742526526ee5865777.tar.bz2
cuberite-1e6f02437e88495d57249f742526526ee5865777.tar.lz
cuberite-1e6f02437e88495d57249f742526526ee5865777.tar.xz
cuberite-1e6f02437e88495d57249f742526526ee5865777.tar.zst
cuberite-1e6f02437e88495d57249f742526526ee5865777.zip
Diffstat (limited to 'src/Mobs/Path.h')
-rw-r--r--src/Mobs/Path.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/Mobs/Path.h b/src/Mobs/Path.h
index 3b9c0400e..c250eece2 100644
--- a/src/Mobs/Path.h
+++ b/src/Mobs/Path.h
@@ -115,7 +115,7 @@ public:
return Vector3d(Point.x + m_HalfWidth, Point.y, Point.z + m_HalfWidth);
}
/** Returns the total number of points this path has. */
- inline int GetPointCount()
+ inline size_t GetPointCount()
{
if (m_Status != ePathFinderStatus::PATH_FOUND)
{
@@ -130,13 +130,13 @@ public:
{
// Guaranteed to have no hash collisions for any 128x128x128 area. Suitable for pathfinding.
int32_t t = 0;
- t += (int8_t)a_Vector.x;
+ t += static_cast<int8_t>(a_Vector.x);
t = t << 8;
- t += (int8_t)a_Vector.y;
+ t += static_cast<int8_t>(a_Vector.y);
t = t << 8;
- t += (int8_t)a_Vector.z;
+ t += static_cast<int8_t>(a_Vector.z);
t = t << 8;
- return (size_t)t;
+ return static_cast<size_t>(t);
}
};
private: