Added cChunkCoords fmtlib formatter.

This commit is contained in:
Mattes D 2023-05-26 12:56:07 +02:00
parent 17d5278d59
commit c5412becd1

View File

@ -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
{