summaryrefslogtreecommitdiffstats
path: root/src/Entities/Player.cpp
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2015-08-22 13:54:36 +0200
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2015-08-22 13:54:36 +0200
commit1cb612ccdc5ba31ea2000164abcc79694336cc92 (patch)
tree5b1d20dd638f9a1be6e4f86c6a095cfe1bf47a2c /src/Entities/Player.cpp
parentMerge pull request #2380 from cuberite/travis (diff)
parentNamespace qualify std::abs, use explicit cast (diff)
downloadcuberite-1cb612ccdc5ba31ea2000164abcc79694336cc92.tar
cuberite-1cb612ccdc5ba31ea2000164abcc79694336cc92.tar.gz
cuberite-1cb612ccdc5ba31ea2000164abcc79694336cc92.tar.bz2
cuberite-1cb612ccdc5ba31ea2000164abcc79694336cc92.tar.lz
cuberite-1cb612ccdc5ba31ea2000164abcc79694336cc92.tar.xz
cuberite-1cb612ccdc5ba31ea2000164abcc79694336cc92.tar.zst
cuberite-1cb612ccdc5ba31ea2000164abcc79694336cc92.zip
Diffstat (limited to 'src/Entities/Player.cpp')
-rw-r--r--src/Entities/Player.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Entities/Player.cpp b/src/Entities/Player.cpp
index b8673420d..910ad4c0e 100644
--- a/src/Entities/Player.cpp
+++ b/src/Entities/Player.cpp
@@ -2124,7 +2124,7 @@ void cPlayer::UpdateMovementStats(const Vector3d & a_DeltaPos, bool a_PreviousIs
else if (a_DeltaPos.y < 0.0)
{
// Increment statistic
- m_Stats.AddValue(statDistFallen, (StatValue)(abs(a_DeltaPos.y) * 100 + 0.5));
+ m_Stats.AddValue(statDistFallen, static_cast<StatValue>(std::abs(a_DeltaPos.y) * 100 + 0.5));
}
// TODO: good opportunity to detect illegal flight (check for falling tho)
}