summaryrefslogtreecommitdiffstats
path: root/src/LineBlockTracer.cpp
diff options
context:
space:
mode:
authortycho <work.tycho@gmail.com>2015-05-24 13:56:56 +0200
committertycho <work.tycho@gmail.com>2015-05-24 13:56:56 +0200
commitdae9e5792a4f030ae9e748548a16a89790fbd311 (patch)
tree2142b8c4deb9f2c7ad096b8b0ec93fefccd8d8f1 /src/LineBlockTracer.cpp
parentMerge branch 'master' into PreventNewWarnings (diff)
downloadcuberite-dae9e5792a4f030ae9e748548a16a89790fbd311.tar
cuberite-dae9e5792a4f030ae9e748548a16a89790fbd311.tar.gz
cuberite-dae9e5792a4f030ae9e748548a16a89790fbd311.tar.bz2
cuberite-dae9e5792a4f030ae9e748548a16a89790fbd311.tar.lz
cuberite-dae9e5792a4f030ae9e748548a16a89790fbd311.tar.xz
cuberite-dae9e5792a4f030ae9e748548a16a89790fbd311.tar.zst
cuberite-dae9e5792a4f030ae9e748548a16a89790fbd311.zip
Diffstat (limited to 'src/LineBlockTracer.cpp')
-rw-r--r--src/LineBlockTracer.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/LineBlockTracer.cpp b/src/LineBlockTracer.cpp
index e43a79566..ee28bef88 100644
--- a/src/LineBlockTracer.cpp
+++ b/src/LineBlockTracer.cpp
@@ -96,17 +96,17 @@ bool cLineBlockTracer::Trace(double a_StartX, double a_StartY, double a_StartZ,
m_Callbacks->OnIntoWorld(m_StartX, m_StartY, m_StartZ);
}
- m_CurrentX = (int)floor(m_StartX);
- m_CurrentY = (int)floor(m_StartY);
- m_CurrentZ = (int)floor(m_StartZ);
+ m_CurrentX = static_cast<int>(floor(m_StartX));
+ m_CurrentY = static_cast<int>(floor(m_StartY));
+ m_CurrentZ = static_cast<int>(floor(m_StartZ));
m_DiffX = m_EndX - m_StartX;
m_DiffY = m_EndY - m_StartY;
m_DiffZ = m_EndZ - m_StartZ;
// The actual trace is handled with ChunkMapCS locked by calling our Item() for the specified chunk
- int BlockX = (int)floor(m_StartX);
- int BlockZ = (int)floor(m_StartZ);
+ int BlockX = static_cast<int>(floor(m_StartX));
+ int BlockZ = static_cast<int>(floor(m_StartZ));
int ChunkX, ChunkZ;
cChunkDef::BlockToChunk(BlockX, BlockZ, ChunkX, ChunkZ);
return m_World->DoWithChunk(ChunkX, ChunkZ, *this);
@@ -120,7 +120,7 @@ void cLineBlockTracer::FixStartAboveWorld(void)
{
// We must set the start Y to less than cChunkDef::Height so that it is considered inside the world later on
// Therefore we use an EPS-offset from the height, as small as reasonably possible.
- const double Height = (double)cChunkDef::Height - 0.00001;
+ const double Height = static_cast<double>(cChunkDef::Height) - 0.00001;
CalcXZIntersection(Height, m_StartX, m_StartZ);
m_StartY = Height;
}