ManaPlus
Macros
intdefines.h File Reference

(986a3bf)

#include "localconsts.h"

Go to the source code of this file.

Macros

#define defIntEnum(name, type)
 
#define fromInt(val, name)   static_cast<name>(val)
 
#define toInt(val, name)   static_cast<name>(val)
 
#define defIntEnumNeg(name)   const name name##_negOne = -1
 

Macro Definition Documentation

◆ defIntEnum

#define defIntEnum (   name,
  type 
)
Value:
typedef type name; \
const name name##_zero = 0; \
const name name##_one = 1

Definition at line 42 of file intdefines.h.

◆ defIntEnumNeg

#define defIntEnumNeg (   name)    const name name##_negOne = -1

Definition at line 48 of file intdefines.h.

◆ fromInt

#define fromInt (   val,
  name 
)    static_cast<name>(val)

Definition at line 46 of file intdefines.h.

◆ toInt

#define toInt (   val,
  name 
)    static_cast<name>(val)

Definition at line 47 of file intdefines.h.