Cuberite
A lightweight, fast and extensible game server for Minecraft
Macros | Functions
FastNBT.cpp File Reference
#include "Globals.h"
#include "FastNBT.h"
Include dependency graph for FastNBT.cpp:

Go to the source code of this file.

Macros

#define CASE_SIMPLE_TAG(TAGTYPE, LEN)
 
#define NBT_RESERVE_SIZE   200
 
#define NEEDBYTES(N, ERR)
 
#define PROPAGATE_ERROR(X)   do { auto Err = (X); if (Err != eNBTParseError::npSuccess) return Err; } while (false)
 

Functions

std::error_code make_error_code (eNBTParseError a_Err) noexcept
 

Macro Definition Documentation

◆ CASE_SIMPLE_TAG

#define CASE_SIMPLE_TAG (   TAGTYPE,
  LEN 
)
Value:
case TAG_##TAGTYPE: \
{ \
Tag.m_DataStart = m_Pos; \
Tag.m_DataLength = LEN; \
m_Pos += LEN; \
}

Definition at line 284 of file FastNBT.cpp.

◆ NBT_RESERVE_SIZE

#define NBT_RESERVE_SIZE   200

Definition at line 16 of file FastNBT.cpp.

◆ NEEDBYTES

#define NEEDBYTES (   N,
  ERR 
)
Value:
do { \
if (m_Data.size() - m_Pos < static_cast<size_t>(N)) \
{ \
return ERR; \
} \
} while (false)

Definition at line 138 of file FastNBT.cpp.

◆ PROPAGATE_ERROR

#define PROPAGATE_ERROR (   X)    do { auto Err = (X); if (Err != eNBTParseError::npSuccess) return Err; } while (false)

Definition at line 23 of file FastNBT.cpp.

Function Documentation

◆ make_error_code()

std::error_code make_error_code ( eNBTParseError  a_Err)
noexcept

Definition at line 126 of file FastNBT.cpp.