1
0
Fork 0

Code style: Fixed braces on separate lines.

This commit is contained in:
madmaxoft 2014-07-19 15:23:40 +02:00
parent 822d83009d
commit 08748bafe2
14 changed files with 38 additions and 20 deletions

View File

@ -10,7 +10,8 @@
// The "map" used for biome <-> string conversions:
static struct {
static struct
{
EMCSBiome m_Biome;
const char * m_String;
} g_BiomeMap[] =

View File

@ -27,7 +27,8 @@ class cChestEntity :
typedef cBlockEntityWithItems super;
public:
enum {
enum
{
ContentsHeight = 3,
ContentsWidth = 9,
} ;

View File

@ -35,7 +35,8 @@ class cDropSpenserEntity :
typedef cBlockEntityWithItems super;
public:
enum {
enum
{
ContentsHeight = 3,
ContentsWidth = 3,
} ;

View File

@ -22,7 +22,8 @@ class cHopperEntity :
typedef cBlockEntityWithItems super;
public:
enum {
enum
{
ContentsHeight = 1,
ContentsWidth = 5,
TICKS_PER_TRANSFER = 8, ///< How many ticks at minimum between two item transfers to or from the hopper

View File

@ -255,7 +255,8 @@ AString ItemToFullString(const cItem & a_Item)
int StringToMobType(const AString & a_MobString)
{
static struct {
static struct
{
int m_MobType;
const char * m_String;
} MobMap [] =

View File

@ -622,7 +622,8 @@ void cPlayer::FinishEating(void)
GetInventory().RemoveOneEquippedItem();
// if the food is mushroom soup, return a bowl to the inventory
if( Item.m_ItemType == E_ITEM_MUSHROOM_SOUP ) {
if (Item.m_ItemType == E_ITEM_MUSHROOM_SOUP)
{
cItem emptyBowl(E_ITEM_BOWL, 1, 0, "");
GetInventory().AddItem(emptyBowl, true, true);
}

View File

@ -55,7 +55,8 @@ public :
// return the mobs that are within the range of distance of the closest player they are
// that means that if a mob is 30 m from a player and 150 m from another one. It will be
// in the range [0..50] but not in [100..200]
struct sIterablePair{
struct sIterablePair
{
tDistanceToMonster::const_iterator m_Begin;
tDistanceToMonster::const_iterator m_End;
int m_Count;

View File

@ -519,7 +519,8 @@ NOISE_DATATYPE cNoise::CubicNoise3D(NOISE_DATATYPE a_X, NOISE_DATATYPE a_Y, NOIS
const int BaseY = FAST_FLOOR(a_Y);
const int BaseZ = FAST_FLOOR(a_Z);
const NOISE_DATATYPE points1[4][4] = {
const NOISE_DATATYPE points1[4][4] =
{
{ IntNoise3D(BaseX - 1, BaseY - 1, BaseZ - 1), IntNoise3D(BaseX, BaseY - 1, BaseZ - 1), IntNoise3D(BaseX + 1, BaseY - 1, BaseZ - 1), IntNoise3D(BaseX + 2, BaseY - 1, BaseZ - 1), },
{ IntNoise3D(BaseX - 1, BaseY, BaseZ - 1), IntNoise3D(BaseX, BaseY, BaseZ - 1), IntNoise3D(BaseX + 1, BaseY, BaseZ - 1), IntNoise3D(BaseX + 2, BaseY, BaseZ - 1), },
{ IntNoise3D(BaseX - 1, BaseY + 1, BaseZ - 1), IntNoise3D(BaseX, BaseY + 1, BaseZ - 1), IntNoise3D(BaseX + 1, BaseY + 1, BaseZ - 1), IntNoise3D(BaseX + 2, BaseY + 1, BaseZ - 1), },
@ -532,7 +533,8 @@ NOISE_DATATYPE cNoise::CubicNoise3D(NOISE_DATATYPE a_X, NOISE_DATATYPE a_Y, NOIS
const NOISE_DATATYPE x1interp3 = CubicInterpolate( points1[2][0], points1[2][1], points1[2][2], points1[2][3], FracX );
const NOISE_DATATYPE x1interp4 = CubicInterpolate( points1[3][0], points1[3][1], points1[3][2], points1[3][3], FracX );
const NOISE_DATATYPE points2[4][4] = {
const NOISE_DATATYPE points2[4][4] =
{
{ IntNoise3D(BaseX - 1, BaseY - 1, BaseZ), IntNoise3D(BaseX, BaseY - 1, BaseZ), IntNoise3D(BaseX + 1, BaseY - 1, BaseZ), IntNoise3D(BaseX + 2, BaseY - 1, BaseZ), },
{ IntNoise3D(BaseX - 1, BaseY, BaseZ), IntNoise3D(BaseX, BaseY, BaseZ), IntNoise3D(BaseX + 1, BaseY, BaseZ), IntNoise3D(BaseX + 2, BaseY, BaseZ), },
{ IntNoise3D(BaseX - 1, BaseY + 1, BaseZ), IntNoise3D(BaseX, BaseY + 1, BaseZ), IntNoise3D(BaseX + 1, BaseY + 1, BaseZ), IntNoise3D(BaseX + 2, BaseY + 1, BaseZ), },
@ -544,7 +546,8 @@ NOISE_DATATYPE cNoise::CubicNoise3D(NOISE_DATATYPE a_X, NOISE_DATATYPE a_Y, NOIS
const NOISE_DATATYPE x2interp3 = CubicInterpolate( points2[2][0], points2[2][1], points2[2][2], points2[2][3], FracX );
const NOISE_DATATYPE x2interp4 = CubicInterpolate( points2[3][0], points2[3][1], points2[3][2], points2[3][3], FracX );
const NOISE_DATATYPE points3[4][4] = {
const NOISE_DATATYPE points3[4][4] =
{
{ IntNoise3D( BaseX-1, BaseY-1, BaseZ+1 ), IntNoise3D( BaseX, BaseY-1, BaseZ+1 ), IntNoise3D( BaseX+1, BaseY-1, BaseZ+1 ), IntNoise3D( BaseX+2, BaseY-1, BaseZ + 1), },
{ IntNoise3D( BaseX-1, BaseY, BaseZ+1 ), IntNoise3D( BaseX, BaseY, BaseZ+1 ), IntNoise3D( BaseX+1, BaseY, BaseZ+1 ), IntNoise3D( BaseX+2, BaseY, BaseZ + 1), },
{ IntNoise3D( BaseX-1, BaseY+1, BaseZ+1 ), IntNoise3D( BaseX, BaseY+1, BaseZ+1 ), IntNoise3D( BaseX+1, BaseY+1, BaseZ+1 ), IntNoise3D( BaseX+2, BaseY+1, BaseZ + 1), },
@ -556,7 +559,8 @@ NOISE_DATATYPE cNoise::CubicNoise3D(NOISE_DATATYPE a_X, NOISE_DATATYPE a_Y, NOIS
const NOISE_DATATYPE x3interp3 = CubicInterpolate( points3[2][0], points3[2][1], points3[2][2], points3[2][3], FracX );
const NOISE_DATATYPE x3interp4 = CubicInterpolate( points3[3][0], points3[3][1], points3[3][2], points3[3][3], FracX );
const NOISE_DATATYPE points4[4][4] = {
const NOISE_DATATYPE points4[4][4] =
{
{ IntNoise3D( BaseX-1, BaseY-1, BaseZ+2 ), IntNoise3D( BaseX, BaseY-1, BaseZ+2 ), IntNoise3D( BaseX+1, BaseY-1, BaseZ+2 ), IntNoise3D( BaseX+2, BaseY-1, BaseZ+2 ), },
{ IntNoise3D( BaseX-1, BaseY, BaseZ+2 ), IntNoise3D( BaseX, BaseY, BaseZ+2 ), IntNoise3D( BaseX+1, BaseY, BaseZ+2 ), IntNoise3D( BaseX+2, BaseY, BaseZ+2 ), },
{ IntNoise3D( BaseX-1, BaseY+1, BaseZ+2 ), IntNoise3D( BaseX, BaseY+1, BaseZ+2 ), IntNoise3D( BaseX+1, BaseY+1, BaseZ+2 ), IntNoise3D( BaseX+2, BaseY+1, BaseZ+2 ), },

View File

@ -103,7 +103,8 @@ public:
protected:
/// Results of packet-parsing:
enum {
enum
{
PARSE_OK = 1,
PARSE_ERROR = -1,
PARSE_UNKNOWN = -2,

View File

@ -45,7 +45,8 @@ AString cObjective::TypeToString(eType a_Type)
cObjective::eType cObjective::StringToType(const AString & a_Name)
{
static struct {
static struct
{
eType m_Type;
const char * m_String;
} TypeMap [] =

View File

@ -30,7 +30,8 @@
#include <sstream>
#include <iostream>
extern "C" {
extern "C"
{
#include "zlib/zlib.h"
}

View File

@ -7,7 +7,8 @@
cStatInfo cStatInfo::ms_Info[statCount] = {
cStatInfo cStatInfo::ms_Info[statCount] =
{
// The order must match the order of enum eStatistic
// http://minecraft.gamepedia.com/Achievements

View File

@ -509,8 +509,9 @@ The fall-through switches in UTF-8 reading code save a
temp variable, some decrements & conditionals. The switches
are equivalent to the following loop:
{
int tmpBytesToRead = extraBytesToRead+1;
do {
int tmpBytesToRead = extraBytesToRead + 1;
do
{
ch += *source++;
--tmpBytesToRead;
if (tmpBytesToRead) ch <<= 6;
@ -784,7 +785,8 @@ AString Base64Decode(const AString & a_Base64String)
AString Base64Encode(const AString & a_Input)
{
static const char BASE64[64] = {
static const char BASE64[64] =
{
'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P',
'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f',
'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v',

View File

@ -101,9 +101,10 @@ protected:
}
} ;
struct FuncTable {
struct FuncTable
{
static void Delete(sChunkLoad) {};
static void Combine(sChunkLoad& a_orig, const sChunkLoad a_new)
static void Combine(sChunkLoad & a_orig, const sChunkLoad a_new)
{
a_orig.m_Generate |= a_new.m_Generate;
};