Added cChunkCoords fmtlib formatter.
This commit is contained in:
parent
17d5278d59
commit
c5412becd1
@ -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
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user