summaryrefslogtreecommitdiffstats
path: root/src/Map.cpp
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2023-05-11 22:05:17 +0200
committerMattes D <github@xoft.cz>2023-05-16 23:50:37 +0200
commitc9522fb740200ccef6230cec452c48efb31e5394 (patch)
tree7e74d70699e13dd0a92444a1a0add7a3059ac7ca /src/Map.cpp
parentTry a timeout for jobs. (diff)
downloadcuberite-c9522fb740200ccef6230cec452c48efb31e5394.tar
cuberite-c9522fb740200ccef6230cec452c48efb31e5394.tar.gz
cuberite-c9522fb740200ccef6230cec452c48efb31e5394.tar.bz2
cuberite-c9522fb740200ccef6230cec452c48efb31e5394.tar.lz
cuberite-c9522fb740200ccef6230cec452c48efb31e5394.tar.xz
cuberite-c9522fb740200ccef6230cec452c48efb31e5394.tar.zst
cuberite-c9522fb740200ccef6230cec452c48efb31e5394.zip
Diffstat (limited to 'src/Map.cpp')
-rw-r--r--src/Map.cpp24
1 files changed, 11 insertions, 13 deletions
diff --git a/src/Map.cpp b/src/Map.cpp
index c02cd80f8..9e3c364b1 100644
--- a/src/Map.cpp
+++ b/src/Map.cpp
@@ -23,29 +23,27 @@ cMap::cMap(unsigned int a_ID, cWorld * a_World):
m_Scale(3),
m_CenterX(0),
m_CenterZ(0),
- m_World(a_World)
+ m_World(a_World),
+ m_Name(fmt::format(FMT_STRING("map_{}"), m_ID))
{
m_Data.assign(m_Width * m_Height, E_BASE_COLOR_TRANSPARENT);
-
- Printf(m_Name, "map_%i", m_ID);
}
-cMap::cMap(unsigned int a_ID, int a_CenterX, int a_CenterZ, cWorld * a_World, unsigned int a_Scale)
- : m_ID(a_ID)
- , m_Width(cChunkDef::Width * 8)
- , m_Height(cChunkDef::Width * 8)
- , m_Scale(a_Scale)
- , m_CenterX(a_CenterX)
- , m_CenterZ(a_CenterZ)
- , m_World(a_World)
+cMap::cMap(unsigned int a_ID, int a_CenterX, int a_CenterZ, cWorld * a_World, unsigned int a_Scale):
+ m_ID(a_ID),
+ m_Width(cChunkDef::Width * 8),
+ m_Height(cChunkDef::Width * 8),
+ m_Scale(a_Scale),
+ m_CenterX(a_CenterX),
+ m_CenterZ(a_CenterZ),
+ m_World(a_World),
+ m_Name(fmt::format(FMT_STRING("map_{}"), m_ID))
{
m_Data.assign(m_Width * m_Height, E_BASE_COLOR_TRANSPARENT);
-
- Printf(m_Name, "map_%i", m_ID);
}