summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2014-07-19 15:23:40 +0200
committermadmaxoft <github@xoft.cz>2014-07-19 15:23:40 +0200
commit08748bafe26145cd61a179abd131a9dba6065450 (patch)
tree3e69eef8ca94d13b565da38b11699af2d4590e02
parentCheckBasicStyle: Check spaces around commas. (diff)
downloadcuberite-08748bafe26145cd61a179abd131a9dba6065450.tar
cuberite-08748bafe26145cd61a179abd131a9dba6065450.tar.gz
cuberite-08748bafe26145cd61a179abd131a9dba6065450.tar.bz2
cuberite-08748bafe26145cd61a179abd131a9dba6065450.tar.lz
cuberite-08748bafe26145cd61a179abd131a9dba6065450.tar.xz
cuberite-08748bafe26145cd61a179abd131a9dba6065450.tar.zst
cuberite-08748bafe26145cd61a179abd131a9dba6065450.zip
-rw-r--r--src/BiomeDef.cpp3
-rw-r--r--src/BlockEntities/ChestEntity.h3
-rw-r--r--src/BlockEntities/DropSpenserEntity.h3
-rw-r--r--src/BlockEntities/HopperEntity.h3
-rw-r--r--src/BlockID.cpp3
-rw-r--r--src/Entities/Player.cpp3
-rw-r--r--src/MobProximityCounter.h3
-rw-r--r--src/Noise.cpp12
-rw-r--r--src/Protocol/Protocol125.h3
-rw-r--r--src/Scoreboard.cpp3
-rw-r--r--src/Server.cpp3
-rw-r--r--src/Statistics.cpp3
-rw-r--r--src/StringUtils.cpp8
-rw-r--r--src/WorldStorage/WorldStorage.h5
14 files changed, 38 insertions, 20 deletions
diff --git a/src/BiomeDef.cpp b/src/BiomeDef.cpp
index d680377e2..02f8c2232 100644
--- a/src/BiomeDef.cpp
+++ b/src/BiomeDef.cpp
@@ -10,7 +10,8 @@
// The "map" used for biome <-> string conversions:
-static struct {
+static struct
+{
EMCSBiome m_Biome;
const char * m_String;
} g_BiomeMap[] =
diff --git a/src/BlockEntities/ChestEntity.h b/src/BlockEntities/ChestEntity.h
index 310618504..cd06b3e2c 100644
--- a/src/BlockEntities/ChestEntity.h
+++ b/src/BlockEntities/ChestEntity.h
@@ -27,7 +27,8 @@ class cChestEntity :
typedef cBlockEntityWithItems super;
public:
- enum {
+ enum
+ {
ContentsHeight = 3,
ContentsWidth = 9,
} ;
diff --git a/src/BlockEntities/DropSpenserEntity.h b/src/BlockEntities/DropSpenserEntity.h
index 47d3bd492..9f58d0b07 100644
--- a/src/BlockEntities/DropSpenserEntity.h
+++ b/src/BlockEntities/DropSpenserEntity.h
@@ -35,7 +35,8 @@ class cDropSpenserEntity :
typedef cBlockEntityWithItems super;
public:
- enum {
+ enum
+ {
ContentsHeight = 3,
ContentsWidth = 3,
} ;
diff --git a/src/BlockEntities/HopperEntity.h b/src/BlockEntities/HopperEntity.h
index 6ef98f43a..8e856fcda 100644
--- a/src/BlockEntities/HopperEntity.h
+++ b/src/BlockEntities/HopperEntity.h
@@ -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
diff --git a/src/BlockID.cpp b/src/BlockID.cpp
index 023172ca1..af96b4414 100644
--- a/src/BlockID.cpp
+++ b/src/BlockID.cpp
@@ -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 [] =
diff --git a/src/Entities/Player.cpp b/src/Entities/Player.cpp
index 7376441b4..698f77bf6 100644
--- a/src/Entities/Player.cpp
+++ b/src/Entities/Player.cpp
@@ -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);
}
diff --git a/src/MobProximityCounter.h b/src/MobProximityCounter.h
index 8c6c11d68..2dabeaa21 100644
--- a/src/MobProximityCounter.h
+++ b/src/MobProximityCounter.h
@@ -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;
diff --git a/src/Noise.cpp b/src/Noise.cpp
index 145bcc5dd..a30661fe0 100644
--- a/src/Noise.cpp
+++ b/src/Noise.cpp
@@ -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 ), },
diff --git a/src/Protocol/Protocol125.h b/src/Protocol/Protocol125.h
index c0696d206..588dd3473 100644
--- a/src/Protocol/Protocol125.h
+++ b/src/Protocol/Protocol125.h
@@ -103,7 +103,8 @@ public:
protected:
/// Results of packet-parsing:
- enum {
+ enum
+ {
PARSE_OK = 1,
PARSE_ERROR = -1,
PARSE_UNKNOWN = -2,
diff --git a/src/Scoreboard.cpp b/src/Scoreboard.cpp
index 8695f0fb7..def952029 100644
--- a/src/Scoreboard.cpp
+++ b/src/Scoreboard.cpp
@@ -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 [] =
diff --git a/src/Server.cpp b/src/Server.cpp
index 10a354a36..367d507bf 100644
--- a/src/Server.cpp
+++ b/src/Server.cpp
@@ -30,7 +30,8 @@
#include <sstream>
#include <iostream>
-extern "C" {
+extern "C"
+{
#include "zlib/zlib.h"
}
diff --git a/src/Statistics.cpp b/src/Statistics.cpp
index 5c0524f9e..e0c0dd925 100644
--- a/src/Statistics.cpp
+++ b/src/Statistics.cpp
@@ -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
diff --git a/src/StringUtils.cpp b/src/StringUtils.cpp
index 9074ac7c2..b0e5a4ffe 100644
--- a/src/StringUtils.cpp
+++ b/src/StringUtils.cpp
@@ -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',
diff --git a/src/WorldStorage/WorldStorage.h b/src/WorldStorage/WorldStorage.h
index 4d4c46a71..2d5d9c830 100644
--- a/src/WorldStorage/WorldStorage.h
+++ b/src/WorldStorage/WorldStorage.h
@@ -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;
};