summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorx12xx12x <44411062+12xx12@users.noreply.github.com>2021-11-26 09:25:44 +0100
committerAlexander Harkness <me@bearbin.net>2022-01-14 20:43:29 +0100
commit2ec73a3fbd31639a8716cbbaf8910ac50d5fa060 (patch)
tree5242ecd62f2c0f4a9df40580bce14ee083add85c
parentFixed Compiler Warnings (diff)
downloadcuberite-2ec73a3fbd31639a8716cbbaf8910ac50d5fa060.tar
cuberite-2ec73a3fbd31639a8716cbbaf8910ac50d5fa060.tar.gz
cuberite-2ec73a3fbd31639a8716cbbaf8910ac50d5fa060.tar.bz2
cuberite-2ec73a3fbd31639a8716cbbaf8910ac50d5fa060.tar.lz
cuberite-2ec73a3fbd31639a8716cbbaf8910ac50d5fa060.tar.xz
cuberite-2ec73a3fbd31639a8716cbbaf8910ac50d5fa060.tar.zst
cuberite-2ec73a3fbd31639a8716cbbaf8910ac50d5fa060.zip
-rw-r--r--src/Generating/FinishGen.cpp4
-rw-r--r--src/LightingThread.cpp2
-rw-r--r--src/LineBlockTracer.cpp2
3 files changed, 4 insertions, 4 deletions
diff --git a/src/Generating/FinishGen.cpp b/src/Generating/FinishGen.cpp
index 34ca30b26..eafa6f804 100644
--- a/src/Generating/FinishGen.cpp
+++ b/src/Generating/FinishGen.cpp
@@ -1822,7 +1822,7 @@ cFinishGenOres::OreInfos cFinishGenOres::OreInfosFromString(const AString & a_Or
);
continue;
}
- auto oreType = static_cast<BLOCKTYPE>(BlockStringToType(parts[0]));
+ auto oreType = BlockStringToType(parts[0]);
if (oreType < 0)
{
LOGWARNING("Cannot parse ore information from string, invalid OreType: \"%s\".", parts[0].c_str());
@@ -1840,7 +1840,7 @@ cFinishGenOres::OreInfos cFinishGenOres::OreInfosFromString(const AString & a_Or
LOGWARNING("Cannot parse ore information from string, invalid number in OreInfo \"%s\".", ore.c_str());
continue;
}
- res.emplace_back(oreType, oreMeta, maxHeight, numNests, nestSize);
+ res.emplace_back(static_cast<BLOCKTYPE>(oreType), oreMeta, maxHeight, numNests, nestSize);
} // for i - split[]
return res;
}
diff --git a/src/LightingThread.cpp b/src/LightingThread.cpp
index d5e37ff2f..aabd574a8 100644
--- a/src/LightingThread.cpp
+++ b/src/LightingThread.cpp
@@ -359,7 +359,7 @@ void cLightingThread::PrepareSkyLight(void)
// Fill the top of the chunk with all-light:
if (m_MaxHeight < cChunkDef::Height - 1)
{
- std::fill(m_SkyLight + (m_MaxHeight + 1) * BlocksPerYLayer, m_SkyLight + ARRAYCOUNT(m_SkyLight), 15);
+ std::fill(m_SkyLight + (m_MaxHeight + 1) * BlocksPerYLayer, m_SkyLight + ARRAYCOUNT(m_SkyLight), NIBBLETYPE(15));
}
// Walk every column that has all XZ neighbors
diff --git a/src/LineBlockTracer.cpp b/src/LineBlockTracer.cpp
index 49eba9ac8..6629e0fb7 100644
--- a/src/LineBlockTracer.cpp
+++ b/src/LineBlockTracer.cpp
@@ -334,7 +334,7 @@ bool cLineBlockTracer::ChunkCallback(cChunk * a_Chunk)
return false;
}
}
- else if (m_Callbacks->OnNextBlockNoData(m_Current, m_CurrentFace))
+ else if (m_Callbacks->OnNextBlockNoData(m_Current, static_cast<char>(m_CurrentFace)))
{
// The callback terminated the trace
return false;