Cuberite
A lightweight, fast and extensible game server for Minecraft
Macros | Functions | Variables
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
 

Variables

static const int MAX_LIST_ITEMS = 10000
 If a list being loaded has more than this number of items, it's considered corrupted. More...
 

Macro Definition Documentation

#define CASE_SIMPLE_TAG (   TAGTYPE,
  LEN 
)
Value:
case TAG_##TAGTYPE: \
{ \
Tag.m_DataStart = m_Pos; \
Tag.m_DataLength = LEN; \
m_Pos += LEN; \
}
#define NEEDBYTES(N, ERR)
Definition: FastNBT.cpp:145

Definition at line 291 of file FastNBT.cpp.

#define NBT_RESERVE_SIZE   200

Definition at line 23 of file FastNBT.cpp.

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

Definition at line 145 of file FastNBT.cpp.

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

Definition at line 30 of file FastNBT.cpp.

Function Documentation

std::error_code make_error_code ( eNBTParseError  a_Err)

Definition at line 133 of file FastNBT.cpp.

Variable Documentation

const int MAX_LIST_ITEMS = 10000
static

If a list being loaded has more than this number of items, it's considered corrupted.

Definition at line 14 of file FastNBT.cpp.