summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/ChunkDef.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/ChunkDef.h b/src/ChunkDef.h
index ea2a3a06d..7d99ca6e8 100644
--- a/src/ChunkDef.h
+++ b/src/ChunkDef.h
@@ -52,6 +52,7 @@ typedef unsigned char HEIGHTTYPE;
+/** Wraps the chunk coords into a single structure. */
class cChunkCoords
{
public:
@@ -98,6 +99,22 @@ public:
+/** Implements custom fmtlib formatting for cChunkCoords. */
+namespace fmt
+{
+ template <> struct formatter<cChunkCoords>: formatter<int>
+ {
+ auto format(cChunkCoords a_Coords, format_context & a_Ctx)
+ {
+ return format_to(a_Ctx.out(), "[{}, {}]", a_Coords.m_ChunkX, a_Coords.m_ChunkZ);
+ }
+ };
+}
+
+
+
+
+
/** Constants used throughout the code, useful typedefs and utility functions */
class cChunkDef
{